1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Fixed old deprecated encoding convert on HTML doc load

This commit is contained in:
Dan Brown
2023-02-23 22:59:26 +00:00
parent 2724b2867b
commit a031edec16
4 changed files with 16 additions and 23 deletions

View File

@ -449,8 +449,8 @@ class PageContent
{
libxml_use_internal_errors(true);
$doc = new DOMDocument();
$html = '<body>' . $html . '</body>';
$doc->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
$html = '<?xml encoding="utf-8" ?><body>' . $html . '</body>';
$doc->loadHTML($html);
return $doc;
}