From 66416e08a2314c2e8797741ffe30a9bd7085cd75 Mon Sep 17 00:00:00 2001 From: Renan Rodrigo Date: Thu, 7 Aug 2025 00:01:52 -0300 Subject: [PATCH] Fix sanitizer function for libxml2 >= 2.14 and HTML5 This is adapting the sanitize function to remove commented XML tags from the resulting markdown. Fixes: #263 --- src/HtmlConverter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HtmlConverter.php b/src/HtmlConverter.php index 944cb08..20a994d 100644 --- a/src/HtmlConverter.php +++ b/src/HtmlConverter.php @@ -233,7 +233,7 @@ protected function sanitize(string $markdown): string * Removing unwanted tags. Tags should be added to the array in the order they are expected. * XML, html and body opening tags should be in that order. Same case with closing tags */ - $unwanted = ['', '', '', '', '', '', '', ' ']; + $unwanted = ['', '', '', '', '', '', '', '', '', ' ']; foreach ($unwanted as $tag) { if (\strpos($tag, '/') === false) {