paquettg/php-html-parser

Incorrect parsing

6562680 opened this issue · 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.