diff --git a/Yesod/Markdown.hs b/Yesod/Markdown.hs
--- a/Yesod/Markdown.hs
+++ b/Yesod/Markdown.hs
@@ -38,7 +38,7 @@
 import Text.Hamlet (hamlet, Html)
 import Database.Persist (PersistField)
 
-import Text.Blaze (preEscapedString, preEscapedText)
+import Text.Blaze.Html (preEscapedToMarkup)
 import Text.Pandoc
 import Text.HTML.SanitizeXSS (sanitizeBalance)
 
@@ -61,7 +61,7 @@
 markdownField = Field
     { fieldParse = blank $ Right . Markdown . unlines . lines' . T.unpack
     , fieldView  = \theId name attrs val _isReq -> toWidget
-        [hamlet|
+        [hamlet|$newline never
 <textarea id="#{theId}" name="#{name}" *{attrs}>#{either id unMarkdown val}
 |]
      }
@@ -110,11 +110,11 @@
 
 -- | Converts the intermediate Pandoc type to Html. Sanitizes HTML.
 writePandoc :: WriterOptions -> Pandoc -> Html
-writePandoc wo = preEscapedText . sanitizeBalance . T.pack . writeHtmlString wo
+writePandoc wo = preEscapedToMarkup . sanitizeBalance . T.pack . writeHtmlString wo
 
 -- | Skips the sanitization and its required conversion to Text
 writePandocTrusted :: WriterOptions -> Pandoc -> Html
-writePandocTrusted wo = preEscapedString . writeHtmlString wo
+writePandocTrusted wo = preEscapedToMarkup . writeHtmlString wo
 
 -- | Parses Markdown into the intermediate Pandoc type
 parseMarkdown :: ParserState -> Markdown -> Pandoc
diff --git a/yesod-markdown.cabal b/yesod-markdown.cabal
--- a/yesod-markdown.cabal
+++ b/yesod-markdown.cabal
@@ -1,5 +1,5 @@
 name:                yesod-markdown
-version:             0.4.0
+version:             0.4.1
 synopsis:            Tools for using markdown in a yesod application
 description:         A subset of pandoc functionality useful for markdown processing in yesod applications
 homepage:            http://github.com/pbrisbin/yesod-markdown
@@ -17,13 +17,13 @@
   build-depends: base            >= 4     && < 5
                , text            >= 0.11  && < 0.12
                , pandoc          >= 1.9   && < 1.10
-               , blaze-html      >= 0.4   && < 0.5
+               , blaze-html      >= 0.5   && < 0.6
                , xss-sanitize    >= 0.3.1 && < 0.4
                , directory
-               , yesod-core      >= 1.0   && < 1.1
-               , yesod-form      >= 1.0   && < 1.1
-               , hamlet          >= 1.0   && < 1.1
-               , persistent      >= 0.9   && < 0.10
+               , yesod-core      >= 1.0   && < 1.2
+               , yesod-form      >= 1.0   && < 1.2
+               , hamlet          >= 1.1   && < 1.2
+               , persistent      >= 0.9   && < 1.1
 
   ghc-options: -Wall
 
