// 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);
}
}
+++ /dev/null
-<?php
-namespace wcf\system\html\output;
-use wcf\system\html\node\HtmlNodeProcessor;
-use wcf\system\html\output\node\HtmlOutputNodeBlockquote;
-use wcf\system\html\output\node\HtmlOutputNodeWoltlabMention;
-
-/**
- * TOOD documentation
- * @since 2.2
- */
-class HtmlOutputNodeProcessor extends HtmlNodeProcessor {
- public function process() {
- // TODO: this should be dynamic to some extent
- $this->invokeHtmlNode(new HtmlOutputNodeBlockquote());
- $this->invokeHtmlNode(new HtmlOutputNodeWoltlabMention());
- }
-}
<?php
namespace wcf\system\html\output;
+use wcf\system\html\output\node\HtmlOutputNodeProcessor;
/**
* TOOD documentation
*/
protected $htmlOutputNodeProcessor;
- public function __construct(HtmlOutputNodeProcessor $htmlOutputNodeProcessor) {
- $this->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;
}
}
--- /dev/null
+<?php
+namespace wcf\system\html\output\node;
+use wcf\system\html\node\HtmlNodeProcessor;
+
+/**
+ * TOOD documentation
+ * @since 2.2
+ */
+class HtmlOutputNodeProcessor extends HtmlNodeProcessor {
+ public function process() {
+ // TODO: this should be dynamic to some extent
+ $this->invokeHtmlNode(new HtmlOutputNodeBlockquote());
+ $this->invokeHtmlNode(new HtmlOutputNodeWoltlabMention());
+ }
+}