diff --git a/classes/display/HTMLDisplayHandler.php b/classes/display/HTMLDisplayHandler.php
index c1c8337d9..633f87569 100644
--- a/classes/display/HTMLDisplayHandler.php
+++ b/classes/display/HTMLDisplayHandler.php
@@ -255,7 +255,7 @@ class HTMLDisplayHandler
// remove template path comment tag
if(!Rhymix\Framework\Debug::isEnabledForCurrentUser())
{
- $output = preg_replace('/\n?\n?/', '', $output);
+ $output = preg_replace('/\n\r?\n/', "\n", $output);
}
}