diff options
author | Andrew Manning <andrew@reticu.li> | 2016-11-29 22:13:24 -0500 |
---|---|---|
committer | Andrew Manning <andrew@reticu.li> | 2016-11-29 22:13:24 -0500 |
commit | 50a8ba8c18b081ce60ba7ab1a74ba30d8ff43794 (patch) | |
tree | 4f38196c3f0b45d6aa87149ca27119481f470c60 /include/bbcode.php | |
parent | b32bce9be22ca9c0c2b47e4a43282e9289c236ff (diff) | |
parent | 8c87f32b381ec0be066cdd0e6ca4fe50079bbd16 (diff) | |
download | volse-hubzilla-50a8ba8c18b081ce60ba7ab1a74ba30d8ff43794.tar.gz volse-hubzilla-50a8ba8c18b081ce60ba7ab1a74ba30d8ff43794.tar.bz2 volse-hubzilla-50a8ba8c18b081ce60ba7ab1a74ba30d8ff43794.zip |
Merge remote-tracking branch 'upstream/dev' into doco
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) { |