Incorrect DOM element access
authorAlexander Ebert <ebert@woltlab.com>
Thu, 2 Jan 2020 15:48:49 +0000 (16:48 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 2 Jan 2020 15:48:49 +0000 (16:48 +0100)
wcfsetup/install/files/lib/system/html/node/HtmlNodePlainLink.class.php

index 6e084bb1126e7fc81ea2b9ddd041265889811d76..a04419c5fb036c4a3005806eb8b3ee25298da559 100644 (file)
@@ -157,7 +157,7 @@ class HtmlNodePlainLink {
                        }
                        
                        // Replace the top level parent with the link itself, which will be replaced with the bbcode afterwards.
-                       $this->topLevelParent->insertBefore($this->link, $this->topLevelParent);
+                       $this->topLevelParent->parentNode->insertBefore($this->link, $this->topLevelParent);
                        DOMUtil::removeNode($this->topLevelParent);
                }