Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e770ca

Browse files
committed
Use filterRelativeXPath
1 parent 78bfaec commit 9e770ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/DomCrawler/Crawler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,9 @@ public function children(/* string $selector = null */)
518518

519519
if (null !== $selector) {
520520
$converter = $this->createCssSelectorConverter($this->isHtml);
521-
$xpath = $converter->toXPath($selector, 'child::*/');
521+
$xpath = $converter->toXPath($selector, 'child::');
522522

523-
return $this->filterXPath($xpath);
523+
return $this->filterRelativeXPath($xpath);
524524
}
525525

526526
$node = $this->getNode(0)->firstChild;

0 commit comments

Comments
 (0)