htmlParseStartTag() - Different behaviour starting from version 2.9.14
We noticed this by chance while running unit tests on our php code.
php's libxml extension is based on libxml2
This code helped us reproduce the changed behaviour:
$document = new DOMDocument();
libxml_use_internal_errors(true);
$document->loadHTML('<%%%%===**>>> foo');
$errors = libxml_get_errors();
var_dump($errors);
When using libxml2 <2.9.14 $errors
contains htmlParseStartTag: invalid element name
as expected.
On versions >=2.9.14, no error at all is returned.
This is a breaking change, likely related to #339 (closed)
Tested with php-7.4
and php-8.1
, both against libxml2 versions 2.9.10, 2.9.12, 2.9.13, 2.9.14, 2.10.3