diff --git a/Yesod/Test/TransversingCSS.hs b/Yesod/Test/TransversingCSS.hs
--- a/Yesod/Test/TransversingCSS.hs
+++ b/Yesod/Test/TransversingCSS.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE CPP #-}
 {- |
 This module uses HXT to transverse an HTML document using CSS selectors.
 
@@ -45,8 +46,13 @@
 import Text.XML
 import Text.XML.Cursor
 import qualified Data.ByteString.Lazy as L
+#if MIN_VERSION_blaze_html(0, 5, 0)
+import Text.Blaze.Html (toHtml)
+import Text.Blaze.Html.Renderer.String (renderHtml)
+#else
 import Text.Blaze (toHtml)
 import Text.Blaze.Renderer.String (renderHtml)
+#endif
 import Text.XML.Xml2Html ()
 
 type Query = T.Text
diff --git a/yesod-test.cabal b/yesod-test.cabal
--- a/yesod-test.cabal
+++ b/yesod-test.cabal
@@ -1,9 +1,9 @@
 name:               yesod-test
-version:            0.2.0
+version:            0.2.0.1
 license:            MIT
 license-file:       LICENSE
 author:             Nubis <nubis@woobiz.com.ar>
-maintainer:         Nubis <nubis@woobiz.com.ar>
+maintainer:         Nubis <nubis@woobiz.com.ar>, Michael Snoyman
 synopsis:           integration testing for WAI/Yesod Applications 
 category:           Web, Yesod, Testing
 stability:          Experimental
@@ -15,6 +15,11 @@
 
 flag ghc7
 
+flag blaze_html_0_5
+    description: use blaze-html 0.5 and blaze-markup 0.5
+    default: False
+
+
 library
     if flag(ghc7)
         build-depends:   base                  >= 4.3      && < 5
@@ -40,8 +45,16 @@
                    , xml-conduit               >= 0.7      && < 0.8
                    , xml-types                 >= 0.3      && < 0.4
                    , containers
-                   , blaze-html                >= 0.4      && < 0.5
                    , xml2html                  >= 0.1.2    && < 0.2
+
+    if flag(blaze_html_0_5)
+        build-depends:
+                     blaze-html               >= 0.5     && < 0.6
+                   , blaze-markup             >= 0.5.1   && < 0.6
+    else
+        build-depends:
+                     blaze-html               >= 0.4     && < 0.5
+
     exposed-modules: Yesod.Test
                      Yesod.Test.CssQuery
                      Yesod.Test.TransversingCSS
