From: Abinoam P. Marques Jr Date: Mon, 13 Feb 2012 01:10:06 +0000 (-0800) Subject: Fixed bbcode [li] and [*] handling. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e575a3a02c324d65e6849ffd3f8cf68e7318f748;p=friendica.git Fixed bbcode [li] and [*] handling. --- diff --git a/include/bbcode.php b/include/bbcode.php index 5eacb256b2..1d11f687de 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -146,12 +146,8 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("(\[center\](.*?)\[\/center\])ism","
$1
",$Text); // Check for list text - - if(stristr($Text,'[/(list|ul|ol)]')) - $Text = str_replace("[*]", "
  • ", $Text); - - if(stristr($Text,'[/list]')) - $Text = str_replace("[*]", "
  • ", $Text); + $Text = str_replace("[*]", "
  • ", $Text); + $Text = preg_replace("/\[li\](.*?)\[\/li\]/ism", '
  • $1
  • ' ,$Text); $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '' ,$Text); $Text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '' @@ -168,7 +164,6 @@ upper-roman;">$2' ,$Text); lower-alpha;">$2' ,$Text); $Text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '' ,$Text); - $Text = preg_replace("/\[li\](.*?)\[\/li\]/sm", '
  • $1
  • ' ,$Text); $Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '$1' ,$Text); $Text = preg_replace("/\[tr\](.*?)\[\/tr\]/sm", '$1' ,$Text);