mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-01-31 12:11:37 +01:00
Merge pull request #63 from AkibaWolf/patch-1
Fixes encoding issues the page HTML is formatted on save
This commit is contained in:
commit
fe0b122aca
@ -125,7 +125,7 @@ class PageRepo
|
|||||||
if($htmlText == '') return $htmlText;
|
if($htmlText == '') return $htmlText;
|
||||||
libxml_use_internal_errors(true);
|
libxml_use_internal_errors(true);
|
||||||
$doc = new \DOMDocument();
|
$doc = new \DOMDocument();
|
||||||
$doc->loadHTML($htmlText);
|
$doc->loadHTML(mb_convert_encoding($htmlText, 'HTML-ENTITIES', 'UTF-8'));
|
||||||
|
|
||||||
$container = $doc->documentElement;
|
$container = $doc->documentElement;
|
||||||
$body = $container->childNodes->item(0);
|
$body = $container->childNodes->item(0);
|
||||||
@ -376,4 +376,4 @@ class PageRepo
|
|||||||
return $this->page->orderBy('updated_at', 'desc')->paginate($count);
|
return $this->page->orderBy('updated_at', 'desc')->paginate($count);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user