git.iko.soy/typeable/mandrill
on master help sign in
Don't escape input to MandrillHtml's FromJSON.

This is so that round tripping MandrillHtml to and from JSON doesn't change its value.

commit6b294471ed1cff3f94bcf1c8b33fe9c94e753aa3 authorIan Grant Jeffries <ian@housejeffries.com> dateMon 22 Dec 2014, 15:44 (12 years ago) parentd05237b
2 files changed+2−2
mandrill.cabal+1−1 src/Network/API/Mandrill/Types.hs+1−1
mandrill.cabal+1−1
@@ -1,5 +1,5 @@
11name: mandrill
2−version: 0.1.1.0
2+version: 0.2.0.0
33synopsis: Library for interfacing with the Mandrill JSON API
44description: Pure Haskell client for the Mandrill JSON API
55license: MIT
src/Network/API/Mandrill/Types.hs+1−1
@@ -135,7 +135,7 @@ instance ToJSON MandrillHtml where
135135 toJSON (MandrillHtml h) = String . TL.toStrict . Blaze.renderHtml $ h
136136
137137instance FromJSON MandrillHtml where
138− parseJSON (String h) = return $ MandrillHtml (Blaze.toHtml h)
138+ parseJSON (String h) = return $ MandrillHtml (Blaze.preEscapedToHtml h)
139139 parseJSON v = typeMismatch "Expecting a String for MandrillHtml" v
140140
141141instance Arbitrary MandrillHtml where