From 6116877eef9cefc381a41dd772c0ef0ddbc25b93 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Mon, 23 Sep 2013 23:17:34 +0400 Subject: [PATCH] libxml_disable_entity_loader() just in case... Change-Id: I5c6394f811f9cd14dc549d005b4583d7575e85aa --- includes/HtmlFormatter.php | 2 ++ 1 file changed, 2 insertions(+) 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'; } -- 2.20.1