]> git.mxchange.org Git - friendica.git/commitdiff
Regexp fix for [LIST=i], [list=i], [LIST=I] and [LIST=i] bbcodes
authorAbinoam P. Marques Jr <abinoam@gmail.com>
Sun, 12 Feb 2012 14:13:49 +0000 (06:13 -0800)
committerAbinoam P. Marques Jr <abinoam@gmail.com>
Sun, 12 Feb 2012 14:13:49 +0000 (06:13 -0800)
include/bbcode.php

index 6b733c8f43150689e4c68c6034ae89da441e6c1f..7825914b55be60618ec39396365dc275ec8caddf 100755 (executable)
@@ -124,10 +124,14 @@ function bbcode($Text,$preserve_nl = false) {
        $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '<ul class="listbullet" style="list-style-type: circle;">$1</ul>' ,$Text);
        $Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '<ul class="listnone" style="list-style-type: none;">$1</ul>' ,$Text);
        $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>' ,$Text);
-       $Text = preg_replace("/\[list=i\](.*?)\[\/list\]/sm",'<ul class="listlowerroman" style="list-style-type: lower-roman;">$1</ul>' ,$Text);
-       $Text = preg_replace("/\[list=I\](.*?)\[\/list\]/sm", '<ul class="listupperroman" style="list-style-type: upper-roman;">$1</ul>' ,$Text);
-       $Text = preg_replace("/\[list=a\](.*?)\[\/list\]/sm", '<ul class="listloweralpha" style="list-style-type: lower-alpha;">$1</ul>' ,$Text);
-       $Text = preg_replace("/\[list=A\](.*?)\[\/list\]/sm", '<ul class="listupperalpha" style="list-style-type: upper-alpha;">$1</ul>' ,$Text);
+       $Text = preg_replace("/\[list=((?-i)i)\](.*?)\[\/list\]/ism",'<ul class="listlowerroman" style="list-style-type: 
+lower-roman;">$2</ul>' ,$Text);
+       $Text = preg_replace("/\[list=((?-i)I)\](.*?)\[\/list\]/ism", '<ul class="listupperroman" style="list-style-type: 
+upper-roman;">$2</ul>' ,$Text);
+       $Text = preg_replace("/\[list=((?-i)a)\](.*?)\[\/list\]/ism", '<ul class="listloweralpha" style="list-style-type: 
+lower-alpha;">$2</ul>' ,$Text);
+       $Text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '<ul class="listupperalpha" style="list-style-type: 
+upper-alpha;">$2</ul>' ,$Text);
        $Text = preg_replace("/\[li\](.*?)\[\/li\]/sm", '<li>$1</li>' ,$Text);
 
        $Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '<td>$1</td>' ,$Text);