@@ -178,9 +178,10 @@ attrName tag attrs = do
178178 <|> (char '=' >> beforeAttrValue tag attrs name)
179179 <|> try (do mc <- peekChar
180180 case mc of
181− Just c | inClass "\x09\x0a\x0c />" c -> afterAttrName tag attrs name
181+ Just c | notNameChar c -> afterAttrName tag attrs name
182182 _ -> empty)
183183 -- <|> -- TODO: NULL
184+ where notNameChar = isWhitespace `orC` isC '/' `orC` isC '>'
184185
185186-- | /§8.2.4.34/: After attribute name state
186187afterAttrName :: TagName -> [Attr] -> AttrName -> Parser Token