diff --git a/ext/bbcode/main.php b/ext/bbcode/main.php index 95d6aac3..a83bb22f 100644 --- a/ext/bbcode/main.php +++ b/ext/bbcode/main.php @@ -20,6 +20,7 @@ class BBCode extends Extension { $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 = preg_replace("/\n\s*\n/", "\n\n", $text); $text = str_replace("\n", "\n
", $text); $text = preg_replace("/\[quote\](.*?)\[\/quote\]/s", "
\\1
", $text); $text = preg_replace("/\[quote=(.*?)\](.*?)\[\/quote\]/s", "Quoting \\1
\\2
", $text);