8000 bug #16873 Able to load big xml files with DomCrawler (zorn-v) · symfony/symfony@ec26f6e · GitHub
[go: up one dir, main page]

Skip to content

Commit ec26f6e

Browse files
committed
bug #16873 Able to load big xml files with DomCrawler (zorn-v)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16873). Discussion ---------- Able to load big xml files with DomCrawler | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 3dae825 Able to load big xml files with DomCrawler
2 parents 898f389 + 3dae825 commit ec26f6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/DomCrawler/Crawler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public function addXmlContent($content, $charset = 'UTF-8')
230230

231231
if ('' !== trim($content)) {
232232
// remove the default namespace to make XPath expressions simpler
233-
@$dom->loadXML(str_replace('xmlns', 'ns', $content), LIBXML_NONET);
233+
@$dom->loadXML(str_replace('xmlns', 'ns', $content), LIBXML_NONET | (defined('LIBXML_PARSEHUGE') ? LIBXML_PARSEHUGE : 0));
234234
}
235235

236236
libxml_use_internal_errors($internalErrors);

0 commit comments

Comments
 (0)
0