libxml_disable_entity_loader() just in case...
authorMax Semenik <maxsem.wiki@gmail.com>
Mon, 23 Sep 2013 19:17:34 +0000 (23:17 +0400)
committerMax Semenik <maxsem.wiki@gmail.com>
Mon, 23 Sep 2013 19:25:26 +0000 (23:25 +0400)
Change-Id: I5c6394f811f9cd14dc549d005b4583d7575e85aa

includes/HtmlFormatter.php

index 99426ec..d13e0a0 100644 (file)
@@ -73,9 +73,11 @@ class HtmlFormatter {
                        $html = str_replace( ' <', '&#32;<', $html );
 
                        libxml_use_internal_errors( true );
+                       $loader = libxml_disable_entity_loader();
                        $this->doc = new DOMDocument();
                        $this->doc->strictErrorChecking = false;
                        $this->doc->loadHTML( $html );
+                       libxml_disable_entity_loader( $loader );
                        libxml_use_internal_errors( false );
                        $this->doc->encoding = 'UTF-8';
                }