You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~ ❯❯❯ php test.php
PHP Warning: DOMDocument::loadHTML(): Unexpected end tag : span in Entity, line: 1 in /home/cameronball/test.php on line 6
PHP Stack trace:
PHP 1. {main}() /home/cameronball/test.php:0
PHP 2. DOMDocument->loadHTML($source = '<?xml encoding="utf-8" ?></span>asd<<h1>') /home/cameronball/test.php:6
2.9.14
encoding="utf-8" ?
asd<
But on 3v4l the output is different: https://3v4l.org/LONuB (it produces just "asd" without the "<"). So seems like the behaviour is different in newer libxml (or even something else) potentially. See also:
I'm not sure this should even be tested. It's difficult to make calls on expected behavior when parsing invalid XML. Really what the test needs to assert is that there is no output produced by warnings - not assert what the value of the parsed invalid XML is.
The text was updated successfully, but these errors were encountered:
Should be related to libxml version or something like that. I have:
And this script:
Produces this output:
But on 3v4l the output is different: https://3v4l.org/LONuB (it produces just "asd" without the "<"). So seems like the behaviour is different in newer libxml (or even something else) potentially. See also:
I'm not sure this should even be tested. It's difficult to make calls on expected behavior when parsing invalid XML. Really what the test needs to assert is that there is no output produced by warnings - not assert what the value of the parsed invalid XML is.
The text was updated successfully, but these errors were encountered: