Fixed HTML message reprocessing
authorAlexander Ebert <ebert@woltlab.com>
Mon, 29 Jan 2018 15:12:54 +0000 (16:12 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 29 Jan 2018 15:12:54 +0000 (16:12 +0100)
See #2524

wcfsetup/install/files/lib/system/html/input/HtmlInputProcessor.class.php
wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacodeMarker.class.php

index c9ca11b7cefbaa939d1ac4440a2343d53b9e759f..d838a252c6384edf2e19f83e47f1ea189aecb1e9 100644 (file)
@@ -111,7 +111,7 @@ class HtmlInputProcessor extends AbstractHtmlProcessor {
                        DOMUtil::removeNode($metacode, true);
                }
                
-               $this->process($html, $objectType, $objectID, false);
+               $this->process($this->getHtml(), $objectType, $objectID, false);
        }
        
        /**
index 685e664a44ac1f0ea2773434976bf66bc15af4d2..02c58d5e0a180c5e20348bde459d9d715d9d4376 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 namespace wcf\system\html\input\node;
+use wcf\system\bbcode\BBCodeHandler;
 use wcf\system\bbcode\HtmlBBCodeParser;
 use wcf\system\event\EventHandler;
 use wcf\system\html\node\AbstractHtmlNodeProcessor;
@@ -94,7 +95,7 @@ class HtmlInputNodeWoltlabMetacodeMarker extends AbstractHtmlInputNode {
                EventHandler::getInstance()->fireAction($this, 'filterGroups', $data);
                
                foreach ($groups as $name => $pairs) {
-                       if (!in_array($name, $data['bbcodes'])) {
+                       if (!in_array($name, $data['bbcodes']) || !BBCodeHandler::getInstance()->isAvailableBBCode($name)) {
                                foreach ($pairs as $pair) {
                                        $pair['attributes'] = $htmlNodeProcessor->parseAttributes($pair['attributes']);
                                        $this->convertToBBCode($name, $pair);