diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-01-08 17:32:50 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-01-08 17:33:32 -0800 |
commit | 5884ff6994e739bd46be4914adcb7fc9cc093056 (patch) | |
tree | 9518c8a56858981986456de16c3419e4dc17c48d | |
parent | 12a5bd3c8d34eddbabee0dc54fd7ce6d9539c9d4 (diff) | |
download | pandoc-5884ff6994e739bd46be4914adcb7fc9cc093056.tar.gz |
Work around tagsoup bug - not allowing uppercase x in hex entities.
Issue submitted at tagsoup.
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 1 | ||||
-rw-r--r-- | src/Text/Pandoc/XML.hs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index db891d5d4..16fe75ed5 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -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 diff --git a/src/Text/Pandoc/XML.hs b/src/Text/Pandoc/XML.hs index 1e01b62f2..82ceff126 100644 --- a/src/Text/Pandoc/XML.hs +++ b/src/Text/Pandoc/XML.hs @@ -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 ++ ";" |