micro optimization
authorJens Hausdorf <hello@jens-hausdorf.de>
Mon, 15 Jan 2018 18:35:59 +0000 (19:35 +0100)
committerGitHub <noreply@github.com>
Mon, 15 Jan 2018 18:35:59 +0000 (19:35 +0100)
wcfsetup/install/files/lib/system/html/input/filter/MessageHtmlInputFilter.class.php

index f8d68497985cab39e3a674ed04bce79fdea50310..136575ccd5283219e49887746096a92a55836e80 100644 (file)
@@ -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('> <', '>&nbsp;<', $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