* newlines in comments

This commit is contained in:
Vincent Ambo 2012-03-15 20:51:53 +01:00
parent cc1bf63468
commit f591f6b4f7

View file

@ -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())