Don't read files textually, force explicit UTF8-decoding

This commit is contained in:
Michael Snoyman 2014-12-18 18:44:22 +02:00
parent 3ee2110602
commit 3d36e2dc28

View File

@ -22,7 +22,7 @@ loadWebsiteContent dir = do
\_ -> readMarkdown "older-releases.md"
return WebsiteContent {..}
where
readHtml fp = fmap (preEscapedToMarkup :: Text -> Html)
readHtml fp = fmap (preEscapedToMarkup . decodeUtf8 :: ByteString -> Html)
$ readFile $ dir </> fp
readMarkdown fp = fmap (markdown def
{ msXssProtect = False