Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DomCrawler] Handle malformed tags in HTML5 parser#62240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
Thanks. The updated behavior makes sense. There's no reason a The test should be added to CrawlerTest.php I think, and have proper skips. |
Ah I didn't see how the tests extended each other before, I understand now. I think this is the right thing to do? The parsers do act differently but I also think it's worth explicitly asserting what each of them do with this edge case, and we might find similar edge cases in the future. |
Thank you@longwave. |
4e517b7 intosymfony:7.4Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Fixes DomCrawler to not crash if it encounters a malformed HTML tag; however the behaviour is still different from the previous version if I naively catch and ignore the exception, as demonstrated by the test case; it should pass on PHP 8.3 and fail on 8.4.