Fix script tag handling for inner blocks in the cart (#51498)

* Avoid parsing scripts when dealing with inner blocks—return as-is

* changelog
This commit is contained in:
Mike Jolley 2024-09-19 14:51:09 +01:00 committed by GitHub
parent bf549e6d8f
commit c5ed90535f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View File

@ -179,6 +179,11 @@ const renderInnerBlocks = ( {
return null;
}
// Return scripts without manipulation.
if ( parsedElement?.type === 'script' ) {
return parsedElement;
}
const renderedChildren = node.childNodes.length
? renderInnerBlocks( {
block,

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fix script tag handling for inner blocks in the cart