[DomCrawler] Made sure only the default namespace is removed when loading an XML content.
This commit is contained in:
parent
e5b8abb564
commit
6e717a3092
@ -197,7 +197,7 @@ class Crawler extends \SplObjectStorage
|
||||
$dom->validateOnParse = true;
|
||||
|
||||
// remove the default namespace to make XPath expressions simpler
|
||||
@$dom->loadXML(str_replace('xmlns', 'ns', $content), LIBXML_NONET);
|
||||
@$dom->loadXML(str_replace('xmlns=', 'ns=', $content), LIBXML_NONET);
|
||||
|
||||
libxml_use_internal_errors($current);
|
||||
libxml_disable_entity_loader($disableEntities);
|
||||
|
Reference in New Issue
Block a user