Permalink
Browse files

Some fixes

  • Loading branch information...
1 parent 0244ece commit cd8abaa7ed205b239b9a4c8b2b53187b74be33c2 @snoyberg snoyberg committed Dec 3, 2012
Showing with 11 additions and 6 deletions.
  1. +2 −2 wai-handler-devel/FullApp.hs
  2. +9 −4 wai-handler-devel/hamlet/testapp.hamlet
@@ -12,7 +12,7 @@ import Database.Persist.Sqlite
import System.Directory
import Control.Monad (when)
import Text.Hamlet
-import Text.Blaze.Html.Renderer.Text (renderHtml)
+import Text.Blaze.Html.Renderer.Utf8 (renderHtml)
import Data.Text.Lazy.Encoding (encodeUtf16LE)
import Control.Monad.Trans.Resource (runResourceT)
import Control.Monad.IO.Class (liftIO)
@@ -42,6 +42,6 @@ fullApp handler = do
count ([] :: [Filter Dummy])
return $ responseLBS status200
[("Content-Type", "text/html; charset=utf-8")] $
- encodeUtf16LE $ renderHtml
+ renderHtml
$(shamletFile "hamlet/testapp.hamlet")
putStrLn "handler completed, this should only happen at the beginning of a reload"
@@ -1,4 +1,9 @@
-%h1 Hello World
-%p Counter: $show x$
-%p The database file is $db$
-%p שלום
+$doctype 5
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Full App
+ <body>
+ <h1>Hello World
+ <p>Counter: #{show x}
+ <p>שלום

0 comments on commit cd8abaa

Please sign in to comment.