about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/Main.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 8adef253a5..84fa0d9dd3 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