diff --git a/include/class.format.php b/include/class.format.php
index e48615ff71848b03b3b6fcc3cb31b15e12ea738b..96fe09d94ba7751ae037a50138c5ddb7fe7b003d 100644
--- a/include/class.format.php
+++ b/include/class.format.php
@@ -379,9 +379,7 @@ class Format {
     }
 
     function stripEmptyLines($string) {
-        //return preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $string);
-        //return preg_replace('/\s\s+/',"\n",$string); //Too strict??
-        return preg_replace("/\n{3,}/", "\n\n", $string);
+        return preg_replace("/\n{3,}/", "\n\n", trim($string));
     }