about summary refs log tree commit diff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorVincent Ambo <v.ambo@me.com>2012-03-15T19·51+0100
committerVincent Ambo <v.ambo@me.com>2012-03-15T19·51+0100
commitf591f6b4f72a6a6989a7631b17fbd9ee5d7f6c6d (patch)
tree0eb195509c1407f896457b7092c915fcb2fb0c48 /src/Main.hs
parentcc1bf634682ed63c0f916acff8b910ddd6f5d135 (diff)
* newlines in comments
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 86d51bdc9a9a..fe111f76668a 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -117,9 +117,10 @@ showIndex acid lang = do
 addComment :: AcidState Blog -> BlogLang -> EntryId -> ServerPart Response
 addComment acid lang eId = do
   now <- liftIO $ getCurrentTime >>= return
+  nCtext <- lookText' "ctext"
   nComment <- Comment <$> pure now
                       <*> lookText' "cname"
-                      <*> lookText' "ctext"
+                      <*> pure (entryEscape nCtext)
   update' acid (AddComment eId nComment)
   seeOther ("/" ++ show lang ++ "/" ++ show eId) (toResponse())