From 60843605889fa9d590ce6c4adc0f3f03f23a55fe Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 7 Sep 2021 07:32:49 +0000 Subject: deprecate the custom highlight [hl] bbcode in favor of [mark] which is a html5 standard --- include/bbcode.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index 25615e385..42790aaca 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1351,12 +1351,18 @@ function bbcode($Text, $options = []) { if (strpos($Text,'[/color]') !== false) { $Text = preg_replace("(\[color=(.*?)\](.*?)\[\/color\])ism", "$2", $Text); } - // Check for colored text + + // @DEPRECATED: Check for colored text (deprecated in favor of mark which is a html5 standard) if (strpos($Text,'[/hl]') !== false) { - $Text = preg_replace("(\[hl\](.*?)\[\/hl\])ism", "$1", $Text); + $Text = preg_replace("(\[hl\](.*?)\[\/hl\])ism", "$1", $Text); $Text = preg_replace("(\[hl=(.*?)\](.*?)\[\/hl\])ism", "$2", $Text); } + if (strpos($Text,'[/mark]') !== false) { + $Text = preg_replace("(\[mark\](.*?)\[\/mark\])ism", "$1", $Text); + $Text = preg_replace("(\[mark=(.*?)\](.*?)\[\/mark\])ism", "$2", $Text); + } + // Check for sized text // [size=50] --> font-size: 50px (with the unit). if (strpos($Text,'[/size]') !== false) { -- cgit v1.2.3