From: Jens Hausdorf Date: Mon, 15 Jan 2018 18:35:59 +0000 (+0100) Subject: micro optimization X-Git-Tag: 3.1.0_RC_2~7^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6e2c6e6fbfa151f7b95bd2d40ffcb2308a9067a9;p=GitHub%2FWoltLab%2FWCF.git micro optimization --- 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