diff --git a/Text/HTML/TagStream/Parser.hs b/Text/HTML/TagStream/Parser.hs
--- a/Text/HTML/TagStream/Parser.hs
+++ b/Text/HTML/TagStream/Parser.hs
@@ -3,7 +3,6 @@
 
 import Control.Applicative
 import Data.ByteString (ByteString)
-import qualified Data.ByteString.Char8 as S
 import Data.Attoparsec.Char8
 import Blaze.ByteString.Builder (toByteString)
 import Text.HTML.TagStream.Types
@@ -127,16 +126,8 @@
               <|> (:[]) . Incomplete . append script <$> takeByteString
   where
     script = toByteString $ showToken id t
-    surround q s = S.concat [S.singleton q, s, S.singleton q]
-    loop acc = do
-        s <- takeTill (in3 ('<','\'','"'))
-        let acc' = if S.null s then acc else Text s:acc
-        mq <- maybeP (satisfy (in2 ('"','\'')))
-        case mq of
-            Just q -> Text . surround q <$> quoted q >>=
-                      loop . (:acc')
-            Nothing -> (:acc') <$> scriptEnd
-
+    loop acc = (:acc) <$> scriptEnd
+           <|> (text >>= loop . (:acc))
     scriptEnd = string "</script>" *> return (TagClose "script")
 
 html :: Parser [Token]
diff --git a/tag-stream.cabal b/tag-stream.cabal
--- a/tag-stream.cabal
+++ b/tag-stream.cabal
@@ -1,5 +1,5 @@
 Name:                tag-stream
-Version:             0.2.0
+Version:             0.2.1
 Synopsis:            streamlined html tag parser
 Description:
     Tag-stream is a library for parsing HTML//XML to a token stream.
diff --git a/tests/Tests.hs b/tests/Tests.hs
--- a/tests/Tests.hs
+++ b/tests/Tests.hs
@@ -103,8 +103,8 @@
   , ( "<>"
     , [TagOpen "" [] False]
     )
-  , ( "<a\ttitle\n=\r\"foo\nbar\" alt=\n/\r\t>"
-    , [TagOpen "a" [("title", "foo\nbar"), ("alt", "/")] False]
+  , ( "<a\ttitle\n=\r\"foo bar\" alt=\n/\r\t>"
+    , [TagOpen "a" [("title", "foo bar"), ("alt", "/")] False]
     )
   -- }}}
   -- comment tag {{{
@@ -141,11 +141,14 @@
   , ( "<script></script>"
     , [TagOpen "script" [] False, TagClose "script"]
     )
-  , ( "<script>var x=\"</script>\";"
-    , [Incomplete "<script>var x=\"</script>\";"]
+  , ( "<script>var x=\"</script>"
+    , [TagOpen "script" [] False, Text "var x=\"", TagClose "script"]
     )
-  , ( "<script>var x=\"</script>\";</script>"
-    , [TagOpen "script" [] False, Text "var x=\"</script>\";", TagClose "script"]
+  --, ( "<script>var x=\"</script>\";</script>"
+  --  , [TagOpen "script" [] False, Text "var x=\"</script>\";", TagClose "script"]
+  --  )
+  , ( "<script>// '\r\n</script>"
+    , [TagOpen "script" [] False, Text "// '\r\n", TagClose "script"]
     )
   -- }}}
   ]
