aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bbcode.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 1ced24ec3..844717572 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -1287,6 +1287,11 @@ function bbcode($text, $options = []) {
if (strpos($text,'[pre]') !== false) {
$text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_spacefy',$text);
}
+
+ if (strpos($text,'</pre>') !== false) {
+ $text = str_replace(["</pre>\r", "</pre>\n"], '</pre>', $text);
+ }
+
if (strpos($text,'[summary]') !== false) {
$text = preg_replace_callback("/\[summary\](.*?)\[\/summary\]/ism", 'bb_spacefy',$text);
}