From: Alexander Ebert Date: Sun, 18 Jun 2017 12:53:26 +0000 (+0200) Subject: Fix for incorrectly nested bbcodes X-Git-Tag: 3.0.6~12^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=050d17e8348517aaa52b5e8fd57f715a5c9b6352;p=GitHub%2FWoltLab%2FWCF.git Fix for incorrectly nested bbcodes --- 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