From: Alexander Ebert Date: Fri, 9 Sep 2016 14:12:50 +0000 (+0200) Subject: Get rid of `
` X-Git-Tag: 3.0.0_Beta_1~242 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=930036f90c6a53f3a70b9359cb767177bc8000a2;p=GitHub%2FWoltLab%2FWCF.git Get rid of `
` --- diff --git a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php index 1a121ed868..2f29a6822b 100644 --- a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php +++ b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php @@ -65,6 +65,19 @@ class HtmlInputNodeProcessor extends AbstractHtmlNodeProcessor { * outside of paragraphs. */ protected function fixDom() { + // remove or convert any
found + $elements = $this->getDocument()->getElementsByTagName('div'); + while ($elements->length) { + $element = $elements->item(0); + + if ($element->parentNode->nodeName === 'P') { + DOMUtil::removeNode($element, true); + } + else { + DOMUtil::replaceElement($element, $element->ownerDocument->createElement('p'), true); + } + } + $appendToPreviousParagraph = function ($node) { /** @var \DOMElement $paragraph */ $paragraph = $node->previousSibling;