File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
app/code/Magento/PageBuilder/Model/Stage
dev/tests/integration/testsuite/Magento/PageBuilder/Model/Stage/Renderer Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ public function removeScriptTags(string $content): string
44
44
try {
45
45
//this code is required because of https://bugs.php.net/bug.php?id=60021
46
46
$ previous = libxml_use_internal_errors (true );
47
- $ dom ->loadHTML ($ content );
47
+ $ dom ->loadHTML ($ content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD );
48
48
} catch (\Exception $ e ) {
49
49
$ this ->loggerInterface ->critical ($ e ->getMessage ());
50
50
}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class CmsStaticBlockTest extends \PHPUnit\Framework\TestCase
12
12
/**
13
13
* @magentoDataFixture Magento/PageBuilder/_files/block_with_script.php
14
14
* @magentoDataFixture Magento/Variable/_files/variable.php
15
- * @magentoAppArea adminhtml
15
+ * @magentoAppArea frontend
16
16
*/
17
17
public function testRender ()
18
18
{
@@ -33,5 +33,7 @@ public function testRender()
33
33
$ content = $ result ['content ' ];
34
34
$ this ->assertNotContains ('<script> ' , $ content );
35
35
$ this ->assertContains ('<p>Custom variable: "HTML Value".</p> ' , $ content );
36
+ $ this ->assertNotContains ('<html> ' , $ content );
37
+ $ this ->assertNotContains ('<!DOCTYPE ' , $ content );
36
38
}
37
39
}
You can’t perform that action at this time.
0 commit comments