summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2011-02-21 15:51:46 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2011-02-21 15:51:46 +1100
commit32050c8eab8c626b687122b88fd650f15c997710 (patch)
tree39dea85a94704cfb7481e21e0df19d1813dd33fb /inc/functions.php
parent5ade310e15c8f1b9471b44e8844ee5bfe5ee59cd (diff)
Strip superfluous new lines at the end of a post.
Diffstat (limited to 'inc/functions.php')
-rw-r--r--inc/functions.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 6e709d9b..0fa20fc3 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -905,6 +905,9 @@
$body = preg_replace("/''(.+?)''/m", "<em>$1</em>", $body);
$body = preg_replace("/\*\*(.+?)\*\*/m", "<span class=\"spoiler\">$1</span>", $body);
}
+ if($config['strip_superfluous_returns'])
+ $body = preg_replace('/\s+$/', '', $body);
+
$body = preg_replace("/\n/", '<br/>', $body);
}