php-html-parser icon indicating copy to clipboard operation
php-html-parser copied to clipboard

Incorrect parsing

Open gzhegow1991 opened this issue 3 years ago • 0 comments

$html = '<a href="#">text (text &lt; ...)</a>'; // i guess from server i receive not `&lt;` but `<` cus of developer hadn't escaped output, and it will cause fail or inside children pointer or inside text node

Parsed to:

strval($dom); // '<a href="#">text (text </a>'

Seems good if just trim invalid symbol, but my parser returns "->nextChild()" not found.

gzhegow1991 avatar Jul 28 '22 18:07 gzhegow1991