From: Alexander Ebert Date: Sat, 14 May 2016 22:07:28 +0000 (+0200) Subject: Some cleanup X-Git-Tag: 3.0.0_Beta_1~1731 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1d8dd3a733bb4c099d9a12f7415af8faa9f0125f;p=GitHub%2FWoltLab%2FWCF.git Some cleanup --- diff --git a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacode.class.php b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacode.class.php index 412d814f12..bdc000f0b6 100644 --- a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacode.class.php +++ b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacode.class.php @@ -81,17 +81,6 @@ class HtmlInputNodeWoltlabMetacode extends AbstractHtmlNode { // attributes are invalid, remove element from DOM DOMUtil::removeNode($element, true); } - - - continue; - $parsedTag = HtmlBBCodeParser::getInstance()->getHtmlOutput($name, $attributes); - - $nodeIdentifier = StringUtil::getRandomID(); - $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, [ - 'parsedTag' => $parsedTag - ]); - - $htmlNodeProcessor->renameTag($metacode, 'wcfNode-' . $nodeIdentifier); } } diff --git a/wcfsetup/install/files/lib/system/html/output/HtmlOutputNodeProcessor.class.php b/wcfsetup/install/files/lib/system/html/output/HtmlOutputNodeProcessor.class.php deleted file mode 100644 index 91b7139e9d..0000000000 --- a/wcfsetup/install/files/lib/system/html/output/HtmlOutputNodeProcessor.class.php +++ /dev/null @@ -1,17 +0,0 @@ -invokeHtmlNode(new HtmlOutputNodeBlockquote()); - $this->invokeHtmlNode(new HtmlOutputNodeWoltlabMention()); - } -} diff --git a/wcfsetup/install/files/lib/system/html/output/HtmlOutputProcessor.class.php b/wcfsetup/install/files/lib/system/html/output/HtmlOutputProcessor.class.php index c9774151d3..d9f12d0733 100644 --- a/wcfsetup/install/files/lib/system/html/output/HtmlOutputProcessor.class.php +++ b/wcfsetup/install/files/lib/system/html/output/HtmlOutputProcessor.class.php @@ -1,5 +1,6 @@ htmlOutputNodeProcessor = $htmlOutputNodeProcessor; + public function process($html) { + $this->getHtmlOutputNodeProcessor()->load($html); + $this->getHtmlOutputNodeProcessor()->process(); + + return $this->getHtmlOutputNodeProcessor()->getHtml(); } - public function process($html) { - $this->htmlOutputNodeProcessor->load($html); - $this->htmlOutputNodeProcessor->process(); + protected function getHtmlOutputNodeProcessor() { + if ($this->htmlOutputNodeProcessor === null) { + $this->htmlOutputNodeProcessor = new HtmlOutputNodeProcessor(); + } - return $this->htmlOutputNodeProcessor->getHtml(); + return $this->htmlOutputNodeProcessor; } } diff --git a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php new file mode 100644 index 0000000000..65794ba25e --- /dev/null +++ b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php @@ -0,0 +1,15 @@ +invokeHtmlNode(new HtmlOutputNodeBlockquote()); + $this->invokeHtmlNode(new HtmlOutputNodeWoltlabMention()); + } +}