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);
...@@ -376,4 +376,4 @@ class PageRepo ...@@ -376,4 +376,4 @@ class PageRepo
376 return $this->page->orderBy('updated_at', 'desc')->paginate($count); 376 return $this->page->orderBy('updated_at', 'desc')->paginate($count);
377 } 377 }
378 378
379 -}
...\ No newline at end of file ...\ No newline at end of file
379 +}
......