diff --git a/xml-conduit/src/Text/XML/Stream/Parse.hs b/xml-conduit/src/Text/XML/Stream/Parse.hs
index ae67cad..d30ea1c 100644
--- a/xml-conduit/src/Text/XML/Stream/Parse.hs
+++ b/xml-conduit/src/Text/XML/Stream/Parse.hs
@@ -635,6 +635,8 @@ parseIdent = takeWhile1 valid > "identifier"
valid '/' = False
valid ';' = False
valid '#' = False
+ valid '[' = False
+ valid ']' = False
valid c = not $ isXMLSpace c
parseContent :: ParseSettings
diff --git a/xml-conduit/test/unit.hs b/xml-conduit/test/unit.hs
index aa6d8f9..701b46f 100644
--- a/xml-conduit/test/unit.hs
+++ b/xml-conduit/test/unit.hs
@@ -798,7 +798,7 @@ testRenderComments =do
resolvedInline :: Assertion
resolvedInline = do
- Res.Document _ root _ <- return $ Res.parseLBS_ Res.def "]>&bar;"
+ Res.Document _ root _ <- return $ Res.parseLBS_ Res.def "]>&bar;"
root @?= Res.Element "foo" Map.empty [Res.NodeContent "baz"]
Res.Document _ root2 _ <- return $ Res.parseLBS_ Res.def "]>"
root2 @?= Res.Element "foo" (Map.singleton "bar" "baz") []