diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+- 0.7.0.0
+    * Depend on blaze-builder 0.4
+
 - 0.6.3.0
     * Add combinators to insert HTML comments
 
diff --git a/blaze-markup.cabal b/blaze-markup.cabal
--- a/blaze-markup.cabal
+++ b/blaze-markup.cabal
@@ -1,5 +1,5 @@
 Name:         blaze-markup
-Version:      0.6.3.0
+Version:      0.7.0.0
 Homepage:     http://jaspervdj.be/blaze
 Bug-Reports:  http://github.com/jaspervdj/blaze-markup/issues
 License:      BSD3
@@ -35,7 +35,7 @@
 
   Build-depends:
     base          >= 4    && < 5,
-    blaze-builder >= 0.2  && < 0.4,
+    blaze-builder >= 0.4  && < 0.5,
     text          >= 0.10 && < 1.3,
     bytestring    >= 0.9  && < 0.11
 
@@ -58,7 +58,7 @@
     test-framework-quickcheck2 >= 0.3 && < 0.4,
     -- Copied from regular dependencies...
     base          >= 4    && < 5,
-    blaze-builder >= 0.2  && < 0.4,
+    blaze-builder >= 0.4  && < 0.5,
     text          >= 0.10 && < 1.3,
     bytestring    >= 0.9  && < 0.11
 
diff --git a/tests/Text/Blaze/Tests.hs b/tests/Text/Blaze/Tests.hs
--- a/tests/Text/Blaze/Tests.hs
+++ b/tests/Text/Blaze/Tests.hs
@@ -10,7 +10,7 @@
 import Control.Monad (replicateM)
 import Control.Applicative (Applicative (..), (<$>))
 import Data.Word (Word8)
-import Data.Char (ord)
+import Data.Char (ord, isControl)
 import qualified Data.List as List
 import qualified Prelude as Prelude
 
@@ -225,11 +225,14 @@
 
     -- Generate arbitrary string element.
     arbitraryString = do
-        s <- arbitrary
+        s <- genString
         return $ string s
 
     -- Generate an arbitrary HTML attribute.
     arbitraryAttribute = do
         attr <- elements [id, class_, name]
-        value <- arbitrary
+        value <- genString
         return $ attr $ stringValue value
+
+    -- Don't use control characters
+    genString = filter (not . isControl) <$> arbitrary
