Skip to content

Commit

Permalink
Merge pull request #29 from seamuslee001/libxml_improve_handling
Browse files Browse the repository at this point in the history
Ensure that library re-sets original xml entity loading value after d…
  • Loading branch information
Progi1984 committed Mar 4, 2019
2 parents 91b3d70 + 8d45746 commit 9e4d0dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Common/XMLReader.php
Expand Up @@ -71,10 +71,11 @@ public function getDomFromZip($zipFile, $xmlFile)
*/
public function getDomFromString($content)
{
$originalLibXMLEntityValue = libxml_disable_entity_loader();
libxml_disable_entity_loader(true);
$this->dom = new \DOMDocument();
$this->dom->loadXML($content);

libxml_disable_entity_loader($originalLibXMLEntityValue);
return $this->dom;
}

Expand Down

0 comments on commit 9e4d0dd

Please sign in to comment.