-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
Symfony version(s) affected
Seen on 6.4.21 (but potentially latest too)
Description
The new version of libxml2 (2.14) fully implements HTML5. That has effect in the loadHTML
method from DOMDocument
in php;
The testAddHtmlContentWithErrors
test in the Component/DomCrawler/Tests/NativeParserCrawlerTest.php
file expects the php snippet there to be invalid, due to the presence of a nav
tag. Because of the above change, that snippet is now considered valid HTML and the error does not happen.
How to reproduce
- Build php using libxml2 >= 2.14
- run the phpunit test
Possible Solution
As the test is meant to check behavior when the HTML content is invalid, a solution would be changing the HTML snippet in the test to something that is invalid both in HTML4 and HTML5.
Additional Context
This bug was caught while packaging symfony
v 6.4.21
in Debian/Ubuntu: