From 32050c8eab8c626b687122b88fd650f15c997710 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Mon, 21 Feb 2011 15:51:46 +1100 Subject: Strip superfluous new lines at the end of a post. --- inc/functions.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'inc/functions.php') 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", "$1", $body); $body = preg_replace("/\*\*(.+?)\*\*/m", "$1", $body); } + if($config['strip_superfluous_returns']) + $body = preg_replace('/\s+$/', '', $body); + $body = preg_replace("/\n/", '
', $body); } -- cgit v1.3