diff options
author | redmatrix <mike@macgirvin.com> | 2016-09-01 12:45:13 -0700 |
---|---|---|
committer | redmatrix <mike@macgirvin.com> | 2016-09-01 12:45:13 -0700 |
commit | 2940f9591b201e5014f3967a90a402c96ae08ac4 (patch) | |
tree | cca4f2de4ff6a76e165c5db9769e3f9fd51c2982 /include/bbcode.php | |
parent | 2ebb8851f684be467ae768fdac0eead1a636805c (diff) | |
parent | 24192ff1eff7df9a46f13349a043507f8fd9034e (diff) | |
download | volse-hubzilla-2940f9591b201e5014f3967a90a402c96ae08ac4.tar.gz volse-hubzilla-2940f9591b201e5014f3967a90a402c96ae08ac4.tar.bz2 volse-hubzilla-2940f9591b201e5014f3967a90a402c96ae08ac4.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 9c65afc59..bc543ca48 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -768,13 +768,14 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false) } // Check for list text $Text = str_replace("[*]", "<li>", $Text); - $Text = str_replace("[]", "<li><input class=\"listcheckbox\" type=\"checkbox\" disabled=\"disabled\">", $Text); - $Text = str_replace("[x]", "<li><input class=\"listcheckbox\" type=\"checkbox\" checked=\"checked\" disabled=\"disabled\">", $Text); + $Text = str_replace("[]", "<li><input type=\"checkbox\" disabled=\"disabled\">", $Text); + $Text = str_replace("[x]", "<li><input type=\"checkbox\" checked=\"checked\" disabled=\"disabled\">", $Text); // handle nested lists $endlessloop = 0; while ((((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false)) || + ((strpos($Text, "[/checklist]") !== false) && (strpos($Text, "[checklist]") !== false)) || ((strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false)) || ((strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false)) || ((strpos($Text, "[/dl]") !== false) && (strpos($Text, "[dl") !== false)) || @@ -786,6 +787,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false) $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("/\[checklist\](.*?)\[\/checklist\]/ism", '<ul class="checklist" style="list-style-type: none;">$1</ul>', $Text); $Text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '<ul class="listbullet" style="list-style-type: circle;">$1</ul>', $Text); $Text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>', $Text); $Text = preg_replace("/\[li\](.*?)\[\/li\]/ism", '<li>$1</li>', $Text); |