We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3af1aa6 + 3d3da7e commit b9851a8Copy full SHA for b9851a8
app/code/Magento/PageBuilder/Model/Stage/HtmlFilter.php
@@ -44,6 +44,7 @@ public function filterHtml(string $content): string
44
try {
45
//this code is required because of https://bugs.php.net/bug.php?id=60021
46
$previous = libxml_use_internal_errors(true);
47
+ $content = '<div>' . $content . '</div>';
48
$string = mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8');
49
$dom->loadHTML($string, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
50
} catch (\Exception $e) {
@@ -82,6 +83,6 @@ public function filterHtml(string $content): string
82
83
);
84
$htmlContentType->nodeValue = htmlentities($innerHTML);
85
}
- return $dom->saveHTML();
86
+ return substr(trim($dom->saveHTML()), 5, -6);
87
88
0 commit comments