diff options
author | zotlabs <mike@macgirvin.com> | 2016-11-29 14:09:01 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2016-11-29 14:27:55 -0800 |
commit | 175ae585630a4f97298ebd389b2607d3ba2e5af6 (patch) | |
tree | 9f65e11e64c87b7f64cf53016d1c954bee4d9ba4 /include/bbcode.php | |
parent | 3ed6d823677e5bfb5e3345b7ea0992d4585a929e (diff) | |
download | volse-hubzilla-175ae585630a4f97298ebd389b2607d3ba2e5af6.tar.gz volse-hubzilla-175ae585630a4f97298ebd389b2607d3ba2e5af6.tar.bz2 volse-hubzilla-175ae585630a4f97298ebd389b2607d3ba2e5af6.zip |
highlight
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 6 |
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) { |