]> BookStack Code Mirror - bookstack/commitdiff
HTML: Tweaked output from full HtmlDocument
authorDan Brown <redacted>
Tue, 14 Nov 2023 17:23:05 +0000 (17:23 +0000)
committerDan Brown <redacted>
Tue, 14 Nov 2023 17:23:05 +0000 (17:23 +0000)
Saves specifically the document element on output to HTML, since this
results in just the outer HTML being saved while not including the extra
XML tags which would show up before with the changes to force utf8
usage.

app/Util/HtmlDocument.php

index f0e12d52864a90a808b3959b4ba7283dc0c2e0c5..b8c53d43916294dccf63ed3821222f2888edf22d 100644 (file)
@@ -125,7 +125,7 @@ class HtmlDocument
      */
     public function getHtml(): string
     {
-        return $this->document->saveHTML();
+        return $this->document->saveHTML($this->document->documentElement);
     }
 
     /**
Morty Proxy This is a proxified and sanitized view of the page, visit original site.