]> BookStack Code Mirror - bookstack/blobdiff - app/Util/HtmlContentFilter.php
Fixed old deprecated encoding convert on HTML doc load
[bookstack] / app / Util / HtmlContentFilter.php
index 5e3c4822c2e16a43c48da4c6f8a0edcbcf618746..e51f512bd1fe762d70928203f30be5efca1bbf5f 100644 (file)
@@ -19,10 +19,10 @@ class HtmlContentFilter
             return $html;
         }
 
-        $html = '<body>' . $html . '</body>';
+        $html = '<?xml encoding="utf-8" ?><body>' . $html . '</body>';
         libxml_use_internal_errors(true);
         $doc = new DOMDocument();
-        $doc->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
+        $doc->loadHTML($html);
         $xPath = new DOMXPath($doc);
 
         // Remove standard script tags