diff --git a/ext/bbcode/main.php b/ext/bbcode/main.php index 5d9b7236..4e535b8d 100644 --- a/ext/bbcode/main.php +++ b/ext/bbcode/main.php @@ -16,8 +16,8 @@ class BBCode implements Extension { $text = preg_replace("/\[code\](.*?)\[\/code\]/s", "
\\1", $text); $text = preg_replace("/>>(\d+)/s", ">>\\1", $text); $text = preg_replace("/>>([^\d].+)/", "
\\1", $text); - $text = preg_replace("/\[url=((?:https?|ftp|irc):\/\/.*?)\](.*?)\[\/url\]/s", "\\2", $text); - $text = preg_replace("/\[url\]((?:https?|ftp|irc):\/\/.*?)\[\/url\]/s", "\\1", $text); + $text = preg_replace("/\[url=((?:https?|ftp|irc|mailto):\/\/.*?)\](.*?)\[\/url\]/s", "\\2", $text); + $text = preg_replace("/\[url\]((?:https?|ftp|irc|mailto):\/\/.*?)\[\/url\]/s", "\\1", $text); $text = preg_replace("/\[\[([^\|\]]+)\|([^\]]+)\]\]/s", "\\2", $text); $text = preg_replace("/\[\[([^\]]+)\]\]/s", "\\1", $text); $text = str_replace("\n", "\n