diff --git a/include/bbcode.php b/include/bbcode.php
index 8c565add6..06a610173 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -99,12 +99,16 @@ function bbcode($Text,$preserve_nl = false) {
if(stristr($Text,'[/list]'))
$Text = str_replace("[*]", "
", $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);
+ if(stristr($Text,'[/list]'))
+ $Text = str_replace("[*]", "", $Text);
+
+ $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("/\[li\](.*?)\[\/li\]/sm", '$1' ,$Text);
$Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '$1 | ' ,$Text);