From 050d17e8348517aaa52b5e8fd57f715a5c9b6352 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 18 Jun 2017 14:53:26 +0200 Subject: [PATCH] Fix for incorrectly nested bbcodes --- .../input/node/HtmlInputNodeWoltlabMetacodeMarker.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacodeMarker.class.php b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacodeMarker.class.php index 7955b4fffb..a7fa114349 100644 --- a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacodeMarker.class.php +++ b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacodeMarker.class.php @@ -380,6 +380,8 @@ class HtmlInputNodeWoltlabMetacodeMarker extends AbstractHtmlInputNode { DOMUtil::removeNode($start); $element = DOMUtil::getParentBefore($element, $commonAncestor); + if ($element === null) $element = $commonAncestor; + while ($element = $element->nextSibling) { if ($element->nodeType === XML_TEXT_NODE) { // ignore text nodes between tags -- 2.20.1