Skip to content

Instantly share code, notes, and snippets.

@Vusys
Created May 1, 2025 22:05
Show Gist options
  • Save Vusys/e2d59d1909727d5a417b6c4acab71b23 to your computer and use it in GitHub Desktop.
Save Vusys/e2d59d1909727d5a417b6c4acab71b23 to your computer and use it in GitHub Desktop.
diff --git a/src/HtmlRenderer.php b/src/HtmlRenderer.php
--- a/src/HtmlRenderer.php
+++ b/src/HtmlRenderer.php
@@ -35,9 +35,9 @@
return Termwind::span($html);
}
$html = '<?xml encoding="UTF-8">'.trim($html);
- $dom->loadHTML($html, LIBXML_NOERROR | LIBXML_COMPACT | LIBXML_HTML_NODEFDTD | LIBXML_NOBLANKS | LIBXML_NOXMLDECL);
+ $dom->loadHTML($html, LIBXML_NOERROR | LIBXML_COMPACT | LIBXML_HTML_NODEFDTD | LIBXML_NOBLANKS);
/** @var DOMNode $body */
$body = $dom->getElementsByTagName('body')->item(0);
$el = $this->convert(new Node($body));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment