From 9de04e135eb38311d871e063722227340bfab27d Mon Sep 17 00:00:00 2001 From: Peter Date: Tue, 30 Apr 2024 09:15:40 +0100 Subject: [PATCH] Widget : Add a new options flag to loadHTML. (#2508) --- lib/Widget/Render/WidgetHtmlRenderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Widget/Render/WidgetHtmlRenderer.php b/lib/Widget/Render/WidgetHtmlRenderer.php index fee65209ab..5492a3ee60 100644 --- a/lib/Widget/Render/WidgetHtmlRenderer.php +++ b/lib/Widget/Render/WidgetHtmlRenderer.php @@ -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) {