git.iko.soy/typeable/html-parse
on master help sign in
Avoid inClass in attrValueUnquoted
commitee02333b33a253da16ce3c6e82e1e289917c6ef7 authorBen Gamari <ben@smart-cactus.org> dateFri 2 Feb 2018, 21:47 (9 years ago) parent418c943
1 file changed+1−1
Text/HTML/Parser.hs+1−1
Text/HTML/Parser.hs+1−1
@@ -219,7 +219,7 @@ attrValueSQuoted tag attrs name = do
219219-- | /§8.2.4.38/: Attribute value (unquoted) state
220220attrValueUnquoted :: TagName -> [Attr] -> AttrName -> Parser Token
221221attrValueUnquoted tag attrs name = do
222− value <- takeTill (inClass "\x09\x0a\x0c >")
222+ value <- takeTill $ isWhitespace `orC` isC '>'
223223 id $ (satisfy isWhitespace >> beforeAttrName tag attrs) -- unsure: don't emit?
224224 <|> (char '>' >> return (TagOpen tag (Attr name value : attrs)))
225225 <|> (endOfInput >> return endOfFileToken)