diff --git a/TagSoup/Test.hs b/TagSoup/Test.hs
--- a/TagSoup/Test.hs
+++ b/TagSoup/Test.hs
@@ -144,6 +144,9 @@
     parseTags "<a href='random.php'><img src='strips/130307.jpg' alt='nukular bish'' title='' /></a>" === 
         [TagOpen "a" [("href","random.php")],TagOpen "img" [("src","strips/130307.jpg"),("alt","nukular bish"),("'",""),("title","")],TagClose "img",TagClose "a"]
 
+    parseTags "<p>some text</p\n<img alt='&lt; &yyy; &gt;' src=\"abc.gif\">" ===
+        [TagOpen "p" [],TagText "some text",TagClose "p"]
+
 
 optionsTests :: Test ()
 optionsTests = check $ \(HTML x) -> all (f x) $ replicateM 3 [False,True]
diff --git a/tagsoup.cabal b/tagsoup.cabal
--- a/tagsoup.cabal
+++ b/tagsoup.cabal
@@ -1,6 +1,6 @@
 cabal-version:  >= 1.6
 name:           tagsoup
-version:        0.11
+version:        0.11.1
 copyright:      Neil Mitchell 2006-2010
 author:         Neil Mitchell <ndmitchell@gmail.com>
 maintainer:     Neil Mitchell <ndmitchell@gmail.com>
@@ -24,12 +24,19 @@
     default: False
     description: Build the test program
 
+flag download
+    default: True
+    description: Build with Download module
+
 library
     ghc-options: -O2
-    build-depends: base == 4.*, network, mtl, containers, bytestring
+    build-depends: base == 4.*, mtl, containers, bytestring
 
+    if flag(download)
+        build-depends: network
+        exposed-modules: Text.HTML.Download
+
     exposed-modules:
-        Text.HTML.Download
         Text.HTML.TagSoup
         Text.HTML.TagSoup.Entity
         Text.HTML.TagSoup.Match
