fix nested lists by parsing li before ul or ol and add a test

This commit is contained in:
Mario
2024-05-03 09:39:58 +02:00
parent 47a86f8771
commit b25662e183
2 changed files with 9 additions and 2 deletions

View File

@@ -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]", "");