From 930036f90c6a53f3a70b9359cb767177bc8000a2 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 9 Sep 2016 16:12:50 +0200 Subject: [PATCH] Get rid of `
` --- .../input/node/HtmlInputNodeProcessor.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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; -- 2.20.1