Skip to content

Commit b366a44

Browse files
authored
Merge branch 'develop' into MC-41471
2 parents f73eb33 + 95c01a7 commit b366a44

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/code/Magento/PageBuilder/Model/Filter/Template.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,13 @@ function ($errorNumber, $errorString) {
173173
$string = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');
174174
try {
175175
libxml_use_internal_errors(true);
176+
// LIBXML_SCHEMA_CREATE option added according to this message
177+
// https://stackoverflow.com/a/66473950/773018
178+
// Its need to avoid bug described in maskScriptTags()
179+
// https://bugs.php.net/bug.php?id=52012
176180
$domDocument->loadHTML(
177-
'<html><body>' . $string . '</body></html>'
181+
'<html><body>' . $string . '</body></html>',
182+
LIBXML_SCHEMA_CREATE
178183
);
179184
libxml_clear_errors();
180185
} catch (Exception $e) {

0 commit comments

Comments
 (0)