aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr <abinoam@gmail.com>2012-02-12 06:13:49 -0800
committerAbinoam P. Marques Jr <abinoam@gmail.com>2012-02-12 06:13:49 -0800
commit5107ee52d3e9c743e977b2e651c8846dfa4ada38 (patch)
treef9a573a9e1e0a29673641478d6528c92341d83b5 /include/bbcode.php
parent34ac72cffdc9c5614ec36013319634b5173f4b47 (diff)
downloadvolse-hubzilla-5107ee52d3e9c743e977b2e651c8846dfa4ada38.tar.gz
volse-hubzilla-5107ee52d3e9c743e977b2e651c8846dfa4ada38.tar.bz2
volse-hubzilla-5107ee52d3e9c743e977b2e651c8846dfa4ada38.zip
Regexp fix for [LIST=i], [list=i], [LIST=I] and [LIST=i] bbcodes
Diffstat (limited to 'include/bbcode.php')
-rwxr-xr-xinclude/bbcode.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 6b733c8f4..7825914b5 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", '<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);