diff options
author | Mario <mario@mariovavti.com> | 2021-09-08 07:43:40 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-09-08 07:43:40 +0000 |
commit | 4c5f0a05c75cc66113f589a3ffe6df351abb1273 (patch) | |
tree | 15148d08a99f8375992e554a90e6d4333286a7cc /include/bbcode.php | |
parent | 952407363e245d41986cfb90e4ccf509bddc7322 (diff) | |
parent | 977a55eb8423745e4d88257b704d3e36f7337b9f (diff) | |
download | volse-hubzilla-6.2.tar.gz volse-hubzilla-6.2.tar.bz2 volse-hubzilla-6.2.zip |
Merge branch '6.2RC'6.2
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 87a7e6af6..42790aaca 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -308,7 +308,7 @@ function bb_parse_app($match) { $app = Zotlabs\Lib\Apps::app_decode($match[1]); if ($app) - return Zotlabs\Lib\Apps::app_render($app); + return preg_replace('/[[:cntrl:]]/', '', Zotlabs\Lib\Apps::app_render($app, 'inline')); } function bb_svg($match) { @@ -1351,12 +1351,18 @@ function bbcode($Text, $options = []) { if (strpos($Text,'[/color]') !== false) { $Text = preg_replace("(\[color=(.*?)\](.*?)\[\/color\])ism", "<span style=\"color: $1;\">$2</span>", $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", "<span class=\"default-highlight\">$1</span>", $Text); + $Text = preg_replace("(\[hl\](.*?)\[\/hl\])ism", "<span class=\"default-highlight\">$1</span>", $Text); $Text = preg_replace("(\[hl=(.*?)\](.*?)\[\/hl\])ism", "<span style=\"background-color: $1;\">$2</span>", $Text); } + if (strpos($Text,'[/mark]') !== false) { + $Text = preg_replace("(\[mark\](.*?)\[\/mark\])ism", "<mark class=\"mark\">$1</mark>", $Text); + $Text = preg_replace("(\[mark=(.*?)\](.*?)\[\/mark\])ism", "<mark style=\"background-color: $1;\">$2</mark>", $Text); + } + // Check for sized text // [size=50] --> font-size: 50px (with the unit). if (strpos($Text,'[/size]') !== false) { |