From 7e9a1d8336bd5e4b57df3097e63088da9ee8ced8 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 25 Nov 2016 15:57:20 +0100 Subject: [PATCH] Improved list bbcode conversion --- .../html/metacode/converter/ListMetacodeConverter.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wcfsetup/install/files/lib/system/html/metacode/converter/ListMetacodeConverter.class.php b/wcfsetup/install/files/lib/system/html/metacode/converter/ListMetacodeConverter.class.php index 832b2140d7..449a296ed8 100644 --- a/wcfsetup/install/files/lib/system/html/metacode/converter/ListMetacodeConverter.class.php +++ b/wcfsetup/install/files/lib/system/html/metacode/converter/ListMetacodeConverter.class.php @@ -163,6 +163,11 @@ class ListMetacodeConverter extends AbstractMetacodeConverter { DOMUtil::removeNode($removeNode); } } + + // remove the first list item if it is completely empty + if ($element->firstChild->childNodes->length === 0 && $element->firstChild !== $element->lastChild) { + DOMUtil::removeNode($element->firstChild); + } } return $element; -- 2.20.1