Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Closed
Description
Symfony version(s) affected
7.4.0-BETA1 and 7.4.x-dev
Description
Drupal has various tests to try and prevent cross-site scripting. One of these tests involves HTML tags containing ampersands, which are not expected but should still be parseable by DomCrawler. In Symfony 7.4 on PHP 8.4, this test now fails with an exception.
I have already upgraded to 7.4.x-dev to solve#62233, but that does not handle this particular case.
How to reproduce
I have reduced the test to a minimal test case:
Symfony 7.3:
> new \Symfony\Component\DomCrawler\Crawler('<script&>')->html();= "<head><script></script></head>"Symfony 7.4:
> new \Symfony\Component\DomCrawler\Crawler('<script&>')->html(); DOMException Invalid Character Error.Possible Solution
No response
Additional Context
No response