Skip to content

Conversation

renanrodrigo
Copy link

This is adapting the sanitize function to remove commented XML tags from the resulting markdown.
Fixes: #263

This is adapting the sanitize function to remove commented XML tags from
the resulting markdown.
Fixes: thephpleague#263
@renanrodrigo
Copy link
Author

renanrodrigo commented Aug 7, 2025

Bear in mind that this change to the sanitize function is addressing the errors found in #263 , but it doesn´t cover other errors which may happen due to the libxml2 changes to loadHTML.
Maybe a proper fix for the future would be considering, at least for php8.4, changing DOMDocument for DOM\HTMLDocument, which conforms to HTML5 and considers UTF-8 by default?
Curious to see how this evolves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem when converting HTML strings when php is compiled with the new libxml2 (2.14)
1 participant