From b25662e183fa800d13908e707e0a3f33131b9ea8 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 3 May 2024 09:39:58 +0200 Subject: fix nested lists by parsing li before ul or ol and add a test --- include/html2bbcode.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/html2bbcode.php') diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 03e09cd62..b7f3ea4e3 100644 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -205,10 +205,9 @@ function html2bbcode($message) node2bbcode($doc, 'audio', array('src'=>'/(.+)/'), '[audio]$1', '[/audio]'); // node2bbcode($doc, 'iframe', array('src'=>'/(.+)/'), '[iframe]$1', '[/iframe]'); - + node2bbcode($doc, 'li', array(), "[*]", ""); node2bbcode($doc, 'ul', array(), "[list]", "[/list]"); node2bbcode($doc, 'ol', array(), "[list=1]", "[/list]"); - node2bbcode($doc, 'li', array(), "[*]", ""); node2bbcode($doc, 'hr', array(), "[hr]", ""); -- cgit v1.2.3