From 60e01524f7b0d16a7dad4e8bdbeb78a273c59f59 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 1 Sep 2016 19:36:23 +0200 Subject: [PATCH] Fixed valid paragraphs being removed --- .../system/html/input/node/HtmlInputNodeProcessor.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 e129c53650..3dc10092d2 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 @@ -259,8 +259,9 @@ class HtmlInputNodeProcessor extends AbstractHtmlNodeProcessor { foreach ($elements as $element) { if ($element->hasChildNodes()) { if ($element->childNodes->length === 1) { - $textContent = StringUtil::trim($element->childNodes[0]->textContent); - if (empty($textContent)) { + /** @var \DOMNode $child */ + $child = $element->childNodes[0]; + if ($child->nodeType === XML_TEXT_NODE && empty(StringUtil::trim($element->childNodes[0]->textContent))) { DOMUtil::removeNode($element); } } -- 2.20.1