File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/code/Magento/PageBuilder/Model/Stage/Renderer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -106,13 +106,13 @@ private function removeScriptTags(array $directiveResult): array
106
106
{
107
107
$ dom = new \DOMDocument ();
108
108
try {
109
+ //this code is required because of https://bugs.php.net/bug.php?id=60021
110
+ $ previous = libxml_use_internal_errors (true );
109
111
$ dom ->loadHTML ($ directiveResult ['content ' ]);
110
112
} catch (\Exception $ e ) {
111
113
$ this ->loggerInterface ->critical ($ e ->getMessage ());
112
- return [
113
- 'error ' => __ ('The block cannot be displayed because it contains errors. ' )
114
- ];
115
114
}
115
+ libxml_use_internal_errors ($ previous );
116
116
foreach (iterator_to_array ($ dom ->getElementsByTagName ('script ' )) as $ item ) {
117
117
$ item ->parentNode ->removeChild ($ item );
118
118
}
You can’t perform that action at this time.
0 commit comments