From e575a3a02c324d65e6849ffd3f8cf68e7318f748 Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Sun, 12 Feb 2012 17:10:06 -0800 Subject: [PATCH] Fixed bbcode [li] and [*] handling. --- include/bbcode.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index 5eacb256b..1d11f687d 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);