about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Main.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 8adef253a591..84fa0d9dd326 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -161,7 +161,10 @@ postEntry acid = do
     getLang "en" = return EN
 
 entryEscape :: Text -> Text
-entryEscape = T.replace "\n" "<br>"
+entryEscape = newlineEscape . newlineRNEscape
+  where
+    newlineEscape = T.replace "\n" "<br>"
+    newlineRNEscape = T.replace "\r\n" "<br>"
 
 entryList :: AcidState Blog -> BlogLang -> ServerPart Response
 entryList acid lang = do