packages feed

stache 2.0.0 → 2.0.1

raw patch · 4 files changed

+8/−3 lines, 4 filesdep ~template-haskell

Dependency ranges changed: template-haskell

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## Stache 2.0.1++* Now interpolation with escaping also escapes single quotes as `&#39`.+ ## Stache 2.0.0  * Uses Megaparsec 7. In particular, the parser now returns
Text/Mustache/Render.hs view
@@ -295,6 +295,7 @@ escapeHtml :: Text -> Text escapeHtml txt = foldr (uncurry T.replace) txt   [ ("\"", "&quot;")+  , ("'",  "&#39;")   , ("<",  "&lt;")   , (">",  "&gt;")   , ("&",  "&amp;") ]
stache.cabal view
@@ -1,5 +1,5 @@ name:                 stache-version:              2.0.0+version:              2.0.1 cabal-version:        1.18 tested-with:          GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3 license:              BSD3
tests/Text/Mustache/RenderSpec.hs view
@@ -29,8 +29,8 @@     r [TextBlock "a text block"] Null `shouldBe` "a text block"   it "renders escaped variables correctly" $     r [EscapedVar (key "foo")]-      (object ["foo" .= ("<html>&\"something\"</html>" :: Text)])-      `shouldBe` "&lt;html&gt;&amp;&quot;something&quot;&lt;/html&gt;"+      (object ["foo" .= ("<html>&\"'something'\"</html>" :: Text)])+      `shouldBe` "&lt;html&gt;&amp;&quot;&#39;something&#39;&quot;&lt;/html&gt;"   it "renders unescaped variables “as is”" $     r [UnescapedVar (key "foo")]       (object ["foo" .= ("<html>&\"something\"</html>" :: Text)])