summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2014-12-26 23:24:49 +0300
committerAndrew Dolgov <[email protected]>2014-12-26 23:24:49 +0300
commit50547484b4c8c04321821b32eb192c1794467cbd (patch)
treeb7ed63e822916390c15d4186ba665cd1da6a5516
parentec5ac2ec300199baceafc2103fb5a3d082ae8444 (diff)
parent4262e0019a519b2db4d6507ff0f2984ac1c6249a (diff)
Merge pull request #429 from dzaikos/master
Temporarily enable entity loader when importing XML file.
-rw-r--r--plugins/import_export/init.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/import_export/init.php b/plugins/import_export/init.php
index d185210ee..e61b62b67 100644
--- a/plugins/import_export/init.php
+++ b/plugins/import_export/init.php
@@ -189,6 +189,8 @@ class Import_Export extends Plugin implements IHandler {
$num_processed = 0;
$num_feeds_created = 0;
+ libxml_disable_entity_loader(false);
+
$doc = @DOMDocument::load($filename);
if (!$doc) {
@@ -206,6 +208,8 @@ class Import_Export extends Plugin implements IHandler {
$doc = DOMDocument::loadXML($data);
}
+ libxml_disable_entity_loader(true);
+
if ($doc) {
$xpath = new DOMXpath($doc);