From 6e2c6e6fbfa151f7b95bd2d40ffcb2308a9067a9 Mon Sep 17 00:00:00 2001 From: Jens Hausdorf Date: Mon, 15 Jan 2018 19:35:59 +0100 Subject: [PATCH] micro optimization --- .../html/input/filter/MessageHtmlInputFilter.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/html/input/filter/MessageHtmlInputFilter.class.php b/wcfsetup/install/files/lib/system/html/input/filter/MessageHtmlInputFilter.class.php index f8d6849798..136575ccd5 100644 --- a/wcfsetup/install/files/lib/system/html/input/filter/MessageHtmlInputFilter.class.php +++ b/wcfsetup/install/files/lib/system/html/input/filter/MessageHtmlInputFilter.class.php @@ -27,9 +27,7 @@ class MessageHtmlInputFilter implements IHtmlInputFilter { // work-around for a libxml bug that causes a single space between // some inline elements to be dropped $html = str_replace('> <', '> <', $html); - - require_once(WCF_DIR . 'lib/system/html/input/filter/HTMLPurifier_URIScheme_ts3server.php'); - + $html = $this->getPurifier()->purify($html); // work-around for a libxml bug that causes a single space between @@ -44,6 +42,8 @@ class MessageHtmlInputFilter implements IHtmlInputFilter { */ protected function getPurifier() { if (self::$purifier === null) { + require_once(WCF_DIR . 'lib/system/html/input/filter/HTMLPurifier_URIScheme_ts3server.php'); + $config = \HTMLPurifier_Config::createDefault(); // we need to prevent automatic finalization, otherwise we cannot read the default -- 2.20.1