Permalink
Browse files

Fix utf8 encoding bug (augh)

  • Loading branch information...
gregorycollins committed Jun 18, 2012
1 parent a218e95 commit 69502cceb795eb9569a34ea50fda5a793150a337
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/Snap/StaticPages/Internal/Handlers.hs
@@ -16,6 +16,8 @@ import Data.Maybe
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
+import qualified Data.Text.Lazy as LT
+import qualified Data.Text.Lazy.Encoding as LT
import Snap.Core
import Snap.Snaplet
import Snap.Snaplet.Heist
@@ -351,7 +353,7 @@ serveFeed soFar content = do
}
modifyResponse $ setContentType "application/atom+xml"
- writeLBS $ L.pack $ XML.showElement $ Atom.xmlFeed feed
+ writeLBS $ LT.encodeUtf8 $ LT.pack $ XML.showElement $ Atom.xmlFeed feed
{-
hasTemplate <- lift $ liftM isJust $ findTemplateForDirectory soFar

0 comments on commit 69502cc

Please sign in to comment.