Merge pull request #350 from stelas/master
Patch for "failed to load external entity" errors in DOMDocument::load calls
This commit is contained in:
commit
6c90d825ce
|
@ -95,7 +95,9 @@ class pluginRSS extends Plugin {
|
||||||
$doc = new DOMDocument();
|
$doc = new DOMDocument();
|
||||||
|
|
||||||
// Load XML
|
// Load XML
|
||||||
|
libxml_disable_entity_loader(false);
|
||||||
$doc->load(PATH_PLUGINS_DATABASES.$this->directoryName.DS.'rss.xml');
|
$doc->load(PATH_PLUGINS_DATABASES.$this->directoryName.DS.'rss.xml');
|
||||||
|
libxml_disable_entity_loader(true);
|
||||||
|
|
||||||
// Print the XML
|
// Print the XML
|
||||||
echo $doc->saveXML();
|
echo $doc->saveXML();
|
||||||
|
|
|
@ -137,7 +137,9 @@ class pluginSitemap extends Plugin {
|
||||||
$doc = new DOMDocument();
|
$doc = new DOMDocument();
|
||||||
|
|
||||||
// Load XML
|
// Load XML
|
||||||
|
libxml_disable_entity_loader(false);
|
||||||
$doc->load(PATH_PLUGINS_DATABASES.$this->directoryName.DS.'sitemap.xml');
|
$doc->load(PATH_PLUGINS_DATABASES.$this->directoryName.DS.'sitemap.xml');
|
||||||
|
libxml_disable_entity_loader(true);
|
||||||
|
|
||||||
// Print the XML
|
// Print the XML
|
||||||
echo $doc->saveXML();
|
echo $doc->saveXML();
|
||||||
|
|
Loading…
Reference in New Issue