X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/31495758a9459d13d6dd4718262c23f7f763bc92..refs/pull/4467/head:/app/Entities/Tools/PageContent.php diff --git a/app/Entities/Tools/PageContent.php b/app/Entities/Tools/PageContent.php index 2613359c3..949816eff 100644 --- a/app/Entities/Tools/PageContent.php +++ b/app/Entities/Tools/PageContent.php @@ -304,7 +304,9 @@ class PageContent if ($blankIncludes) { $content = $this->blankPageIncludes($content); } else { - $content = $this->parsePageIncludes($content); + for ($includeDepth = 0; $includeDepth < 3; $includeDepth++) { + $content = $this->parsePageIncludes($content); + } } return $content; @@ -449,8 +451,8 @@ class PageContent { libxml_use_internal_errors(true); $doc = new DOMDocument(); - $html = '' . $html . ''; - $doc->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8')); + $html = '' . $html . ''; + $doc->loadHTML($html); return $doc; }