Skip to content

Conversation

@asika32764
Copy link

This is a simple fix for rendering PHP 8.4 HTMLDocument, this PR dosen't support the parsing of new DOM.

$doc = \Dom\HTMLElement::createFromString($html);

$string = new HTML5()->saveHTML($doc);

Why

Currently, native PHP HTMLDocument still contains some rendering difference from this library, for instance, PHP rendered the boolean attributes as required="" however this library is required.

This PR make sure the new DOM can be rendered as same as the old DOM which is rendered by this library.

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.

1 participant