diff options
-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 ++ ";" |