diff --git a/src/Vervis/Form/Discussion.hs b/src/Vervis/Form/Discussion.hs index 648acad..8dadcf8 100644 --- a/src/Vervis/Form/Discussion.hs +++ b/src/Vervis/Form/Discussion.hs @@ -1,6 +1,6 @@ {- This file is part of Vervis. - - - Written in 2016 by fr33domlover . + - Written in 2016, 2019 by fr33domlover . - - ♡ Copying is an act of love. Please copy, reuse and share. - @@ -24,6 +24,8 @@ import Prelude import Data.Text (Text) import Yesod.Form +import qualified Data.Text as T + import Vervis.Foundation (Form, Handler) import Vervis.Model @@ -33,7 +35,7 @@ data NewMessage = NewMessage newMessageAForm :: AForm Handler NewMessage newMessageAForm = NewMessage - <$> (unTextarea <$> areq textareaField "" Nothing) + <$> (T.filter (/= '\r') . unTextarea <$> areq textareaField "" Nothing) newMessageForm :: Form NewMessage newMessageForm = renderDivs newMessageAForm