diff options
author | Friendika <info@friendika.com> | 2011-11-03 21:30:01 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-11-03 21:30:01 -0700 |
commit | 0130052b2cfde6ca888506807c1b5e7e61209151 (patch) | |
tree | 71579de013c6a8b55a7f00ac9147ff8c6d63a008 /include/bbcode.php | |
parent | 5f531aa53734818aebb602a8833ea76ec33db90d (diff) | |
download | volse-hubzilla-0130052b2cfde6ca888506807c1b5e7e61209151.tar.gz volse-hubzilla-0130052b2cfde6ca888506807c1b5e7e61209151.tar.bz2 volse-hubzilla-0130052b2cfde6ca888506807c1b5e7e61209151.zip |
bbcode lists
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 4d6eafafa..8c565add6 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -95,6 +95,10 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism","<span style=\"font-size: $1;\">$2</span>",$Text); // Check for list text + + if(stristr($Text,'[/list]')) + $Text = str_replace("[*]", "<li>", $Text); + $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '<ul class="listbullet">$1</ul>' ,$Text); $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '<ul class="listdecimal">$1</ul>' ,$Text); $Text = preg_replace("/\[list=i\](.*?)\[\/list\]/sm",'<ul class="listlowerroman">$1</ul>' ,$Text); @@ -111,7 +115,6 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("/\[table border=0\](.*?)\[\/table\]/sm", '<table border="0" >$1</table>' ,$Text); -// $Text = str_replace("[*]", "<li>", $Text); // Check for font change text $Text = preg_replace("/\[font=(.*?)\](.*?)\[\/font\]/sm","<span style=\"font-family: $1;\">$2</span>",$Text); |