diff --git a/highlighter.cabal b/highlighter.cabal
--- a/highlighter.cabal
+++ b/highlighter.cabal
@@ -1,5 +1,5 @@
 name:                highlighter
-version:             0.2.1
+version:             0.2.2
 synopsis:            source code highlighting
 description:
     Processes source code using tons of lexers, tokenizing it and formatting it as e.g. HTML.
@@ -147,7 +147,7 @@
 
   build-depends:
     { base >= 4 && < 5
-    , blaze-html < 0.5
+    , blaze-html
     , bytestring
     , filepath
     , mtl
@@ -168,7 +168,7 @@
 
   build-depends:
     { base >= 4 && < 5
-    , blaze-html < 0.5
+    , blaze-html
     , bytestring
     , filepath
     , mtl
diff --git a/src/Text/Highlighter/Formatters/Html.hs b/src/Text/Highlighter/Formatters/Html.hs
--- a/src/Text/Highlighter/Formatters/Html.hs
+++ b/src/Text/Highlighter/Formatters/Html.hs
@@ -1,6 +1,7 @@
 {-# LANGUAGE OverloadedStrings #-}
 module Text.Highlighter.Formatters.Html (format, formatInline) where
 
+import Data.Text (Text)
 import Data.Text.Encoding (decodeUtf8)
 import Prelude hiding (div, span)
 import Text.Blaze.Html5
@@ -31,7 +32,7 @@
 highlight :: [Token] -> Html
 highlight [] = return ()
 highlight (Token t s:ts) = do
-    span ! class_ (stringValue $ shortName t) $ text (decodeUtf8 s)
+    span ! class_ (toValue $ shortName t) $ toHtml (decodeUtf8 s)
     highlight ts
 
 countLines :: [Token] -> Int
@@ -44,11 +45,11 @@
   where
     lineNos' c
         | c <= n = do
-            a ! href (stringValue $ "#L-" ++ show c)
-              ! name (stringValue $ "L-" ++ show c) $
-                string (show c)
+            a ! href (toValue $ "#L-" ++ show c)
+              ! name (toValue $ "L-" ++ show c) $
+                toHtml (show c)
 
-            string "\n"
+            toHtml ("\n" :: Text)
 
             lineNos' (c + 1)
         | otherwise = return ()
