html5-php icon indicating copy to clipboard operation
html5-php copied to clipboard

Support render PHP8.4 \Dom\HTMLDocument

Open asika32764 opened this issue 11 months ago • 0 comments

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.

asika32764 avatar Dec 09 '24 05:12 asika32764