Dan Brown

Merge pull request #63 from AkibaWolf/patch-1

Fixes encoding issues the page HTML is formatted on save
...@@ -125,7 +125,7 @@ class PageRepo ...@@ -125,7 +125,7 @@ class PageRepo
125 if($htmlText == '') return $htmlText; 125 if($htmlText == '') return $htmlText;
126 libxml_use_internal_errors(true); 126 libxml_use_internal_errors(true);
127 $doc = new \DOMDocument(); 127 $doc = new \DOMDocument();
128 - $doc->loadHTML($htmlText); 128 + $doc->loadHTML(mb_convert_encoding($htmlText, 'HTML-ENTITIES', 'UTF-8'));
129 129
130 $container = $doc->documentElement; 130 $container = $doc->documentElement;
131 $body = $container->childNodes->item(0); 131 $body = $container->childNodes->item(0);
......