diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index d329c1e326..5f06ba5884 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1473,8 +1473,8 @@ class BBCode $text = preg_replace("/\[list=((?-i)I)\](.*?)\[\/list\]/ism", '

', $text); $text = preg_replace("/\[list=((?-i)a)\](.*?)\[\/list\]/ism", '

', $text); $text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '

', $text); - $text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '

', $text); - $text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '

', $text); + $text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '

', $text); + $text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '

    $1

', $text); $text = preg_replace("/\[li\](.*?)\[\/li\]/ism", '

  • $1
  • ', $text); } diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php index f9f340135c..ebd74121b1 100644 --- a/src/Content/Text/HTML.php +++ b/src/Content/Text/HTML.php @@ -281,8 +281,8 @@ class HTML self::tagToBBCode($doc, 'div', [], "\r", "\r"); self::tagToBBCode($doc, 'p', [], "\n", "\n"); - self::tagToBBCode($doc, 'ul', [], "[list]", "[/list]"); - self::tagToBBCode($doc, 'ol', [], "[list=1]", "[/list]"); + self::tagToBBCode($doc, 'ul', [], "[ul]", "[/ul]"); + self::tagToBBCode($doc, 'ol', [], "[ol]", "[/ol]"); self::tagToBBCode($doc, 'li', [], "[*]", ""); self::tagToBBCode($doc, 'hr', [], "[hr]", ""); diff --git a/tests/src/Content/Text/BBCodeTest.php b/tests/src/Content/Text/BBCodeTest.php index 1bf5dfb902..698b37e700 100644 --- a/tests/src/Content/Text/BBCodeTest.php +++ b/tests/src/Content/Text/BBCodeTest.php @@ -158,21 +158,21 @@ class BBCodeTest extends FixtureTest { return [ 'bug-7271-condensed-space' => [ - 'expectedHtml' => '', + 'expectedHtml' => '
    1. http://example.com/
    ', 'text' => '[ol][*] http://example.com/[/ol]', ], 'bug-7271-condensed-nospace' => [ - 'expectedHtml' => '', + 'expectedHtml' => '
    1. http://example.com/
    ', 'text' => '[ol][*]http://example.com/[/ol]', ], 'bug-7271-indented-space' => [ - 'expectedHtml' => '', + 'expectedHtml' => '', 'text' => '[ul] [*] http://example.com/ [/ul]', ], 'bug-7271-indented-nospace' => [ - 'expectedHtml' => '', + 'expectedHtml' => '', 'text' => '[ul] [*]http://example.com/ [/ul]', @@ -259,7 +259,7 @@ Karl Marx - Die ursprüngliche Akkumulation 'text' => '[emoji=https://fedi.underscore.world/emoji/custom/custom/heart_nb.png]:heart_nb:[/emoji]', ], 'task-12900-multiple-paragraphs' => [ - 'expectedHTML' => '

    Header

    This is a paragraph
    with a line feed.

    Second Chapter

    ', + 'expectedHTML' => '

    Header

    This is a paragraph
    with a line feed.

    Second Chapter

    ', 'text' => "[h1]Header[/h1][ul][*]One[*]Two[/ul]\n\nThis is a paragraph\nwith a line feed.\n\nSecond Chapter", ], 'task-12900-header-with-paragraphs' => [