Merge pull request #1412 from ncaq/master
fixed: yesod-form: textareaField: writeHtmlEscapedChar: convert "\r\n" to "<br>" closed #1354
This commit is contained in:
commit
432c31a652
@ -1,3 +1,7 @@
|
|||||||
|
## 1.4.13
|
||||||
|
|
||||||
|
* Fixed `textareaField` `writeHtmlEscapedChar` trim "\r"
|
||||||
|
|
||||||
## 1.4.12
|
## 1.4.12
|
||||||
|
|
||||||
* Password field does not remember its previous value
|
* Password field does not remember its previous value
|
||||||
|
|||||||
@ -106,6 +106,10 @@ import Data.Attoparsec.Text (Parser, char, string, digit, skipSpace, endOfInput,
|
|||||||
|
|
||||||
import Yesod.Persist.Core
|
import Yesod.Persist.Core
|
||||||
|
|
||||||
|
#if !MIN_VERSION_base(4,8,0)
|
||||||
|
import Data.Monoid
|
||||||
|
#endif
|
||||||
|
|
||||||
defaultFormMessage :: FormMessage -> Text
|
defaultFormMessage :: FormMessage -> Text
|
||||||
defaultFormMessage = englishFormMessage
|
defaultFormMessage = englishFormMessage
|
||||||
|
|
||||||
@ -226,6 +230,7 @@ instance ToHtml Textarea where
|
|||||||
. unTextarea
|
. unTextarea
|
||||||
where
|
where
|
||||||
-- Taken from blaze-builder and modified with newline handling.
|
-- Taken from blaze-builder and modified with newline handling.
|
||||||
|
writeHtmlEscapedChar '\r' = mempty
|
||||||
writeHtmlEscapedChar '\n' = writeByteString "<br>"
|
writeHtmlEscapedChar '\n' = writeByteString "<br>"
|
||||||
writeHtmlEscapedChar c = B.writeHtmlEscapedChar c
|
writeHtmlEscapedChar c = B.writeHtmlEscapedChar c
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-form
|
name: yesod-form
|
||||||
version: 1.4.12
|
version: 1.4.13
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user