Temporarily disable entity loader when importing XML file.
This commit is contained in:
parent
ec5ac2ec30
commit
4262e0019a
1 changed files with 4 additions and 0 deletions
|
@ -189,6 +189,8 @@ class Import_Export extends Plugin implements IHandler {
|
||||||
$num_processed = 0;
|
$num_processed = 0;
|
||||||
$num_feeds_created = 0;
|
$num_feeds_created = 0;
|
||||||
|
|
||||||
|
libxml_disable_entity_loader(false);
|
||||||
|
|
||||||
$doc = @DOMDocument::load($filename);
|
$doc = @DOMDocument::load($filename);
|
||||||
|
|
||||||
if (!$doc) {
|
if (!$doc) {
|
||||||
|
@ -206,6 +208,8 @@ class Import_Export extends Plugin implements IHandler {
|
||||||
$doc = DOMDocument::loadXML($data);
|
$doc = DOMDocument::loadXML($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
libxml_disable_entity_loader(true);
|
||||||
|
|
||||||
if ($doc) {
|
if ($doc) {
|
||||||
|
|
||||||
$xpath = new DOMXpath($doc);
|
$xpath = new DOMXpath($doc);
|
||||||
|
|
Loading…
Reference in a new issue