Closed
Description
I used the DomCrawler::filterXPath method to do some filtering. Since this update 80438c2, the filterXPath method can't handle a simple queries like 'child::div'
.
The error is the same as in #10986 .
Warning: DOMXPath::query(): Invalid expression in /vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Crawler.php on line 832
Most of the listed XPath axes have a problem with this change.
The main cause to this problem is, that the method 'relativize' will append 'self::' to every expression, that's not matched in here.
As a result to this, the XPath expression is invalid.
E.g:
Input
child::div
relativized Xpath
self::child::div
The W3C spec don't allow Xpath expressions like the relativized one.