aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-11-30 10:57:04 +0100
committerMario Vavti <mario@mariovavti.com>2016-11-30 10:57:04 +0100
commit53e4b55ea3722a161b308e4891a2e84ad9ba77af (patch)
tree8504c9e9ff0082d13151aaee4e29f13b01640a02 /include/bbcode.php
parentf32f7d2308957daaf2e3640866d50f740ee6d809 (diff)
parent7b31e5918e72d4812e23a35d1ea4edd6853d3b7a (diff)
downloadvolse-hubzilla-53e4b55ea3722a161b308e4891a2e84ad9ba77af.tar.gz
volse-hubzilla-53e4b55ea3722a161b308e4891a2e84ad9ba77af.tar.bz2
volse-hubzilla-53e4b55ea3722a161b308e4891a2e84ad9ba77af.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 1aabbc129..7e932151f 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -787,6 +787,12 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
if (strpos($Text,'[/color]') !== false) {
$Text = preg_replace("(\[color=(.*?)\](.*?)\[\/color\])ism", "<span style=\"color: $1;\">$2</span>", $Text);
}
+ // Check for colored text
+ if (strpos($Text,'[/hl]') !== false) {
+ $Text = preg_replace("(\[hl\](.*?)\[\/hl\])ism", "<span style=\"background-color: yellow;\">$1</span>", $Text);
+ $Text = preg_replace("(\[hl=(.*?)\](.*?)\[\/hl\])ism", "<span style=\"background-color: $1;\">$2</span>", $Text);
+ }
+
// Check for sized text
// [size=50] --> font-size: 50px (with the unit).
if (strpos($Text,'[/size]') !== false) {