AkibaWolf

Update PageRepo.php

Fix encoding problem.

By default DOMDocument::loadHTML treats a string as being encoded with ISO-8859-1. This causes a problem with saving cyrillic pages' text that becomes completely unreadable (like Проверка instead of normal symbols).
...@@ -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);
......