Skip to content

Commit

Permalink
Widget : Add a new options flag to loadHTML. (#2508)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterMis authored Apr 30, 2024
1 parent d91a2f8 commit 9de04e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Widget/Render/WidgetHtmlRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public function decorateForPreview(

// Handle CSP in preview
$html = new \DOMDocument();
$html->loadHTML($output, LIBXML_NOERROR | LIBXML_NOWARNING);
$html->loadHTML($output, LIBXML_NOERROR | LIBXML_NOWARNING | LIBXML_SCHEMA_CREATE);
foreach ($html->getElementsByTagName('script') as $node) {
// We add this requests cspNonce to every script tag
if ($node instanceof \DOMElement) {
Expand Down

0 comments on commit 9de04e1

Please sign in to comment.