Work around tagsoup bug - not allowing uppercase x in hex entities.

Issue submitted at tagsoup.
This commit is contained in:
John MacFarlane 2016-01-08 17:32:50 -08:00
parent 12a5bd3c8d
commit 5884ff6994
2 changed files with 2 additions and 0 deletions

View file

@ -574,6 +574,7 @@ characterReference = try $ do
char '&'
ent <- many1Till nonspaceChar (char ';')
let ent' = case ent of
'#':'X':xs -> '#':'x':xs -- workaround tagsoup bug
'#':_ -> ent
_ -> ent ++ ";"
case lookupEntity ent' of

View file

@ -107,6 +107,7 @@ fromEntities ('&':xs) =
(zs,';':ys) -> (zs,ys)
(zs, ys) -> (zs,ys)
ent' = case ent of
'#':'X':xs -> '#':'x':xs -- workaround tagsoup bug
'#':_ -> ent
_ -> ent ++ ";"