From: Max Semenik Date: Mon, 23 Sep 2013 19:17:34 +0000 (+0400) Subject: libxml_disable_entity_loader() just in case... X-Git-Tag: 1.31.0-rc.0~18698^2 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=6116877eef9cefc381a41dd772c0ef0ddbc25b93;p=lhc%2Fweb%2Fwiklou.git libxml_disable_entity_loader() just in case... Change-Id: I5c6394f811f9cd14dc549d005b4583d7575e85aa --- diff --git a/includes/HtmlFormatter.php b/includes/HtmlFormatter.php index 99426ecb19..d13e0a04c0 100644 --- a/includes/HtmlFormatter.php +++ b/includes/HtmlFormatter.php @@ -73,9 +73,11 @@ class HtmlFormatter { $html = str_replace( ' <', ' <', $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'; }