From 5107ee52d3e9c743e977b2e651c8846dfa4ada38 Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Sun, 12 Feb 2012 06:13:49 -0800 Subject: [PATCH] Regexp fix for [LIST=i], [list=i], [LIST=I] and [LIST=i] bbcodes --- include/bbcode.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index 6b733c8f43..7825914b55 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -124,10 +124,14 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '' ,$Text); $Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '' ,$Text); $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '' ,$Text); - $Text = preg_replace("/\[list=i\](.*?)\[\/list\]/sm",'' ,$Text); - $Text = preg_replace("/\[list=I\](.*?)\[\/list\]/sm", '' ,$Text); - $Text = preg_replace("/\[list=a\](.*?)\[\/list\]/sm", '' ,$Text); - $Text = preg_replace("/\[list=A\](.*?)\[\/list\]/sm", '' ,$Text); + $Text = preg_replace("/\[list=((?-i)i)\](.*?)\[\/list\]/ism",'' ,$Text); + $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("/\[li\](.*?)\[\/li\]/sm", '
  • $1
  • ' ,$Text); $Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '$1' ,$Text);