
28 Mar
2008
28 Mar
'08
1:26 a.m.
I want to unescape an encoded XML or HTML string, e.g. converting " to the quote character, etc. Since I'm using HaXml anyway, I tried using xmlUnEscapeContent with no luck, e.g. with HaXml 1.19.1: let (CString _ s _) = head $ xmlUnEscapeContent stdXmlEscaper $ [CString False "This is a "quoted string"" ()] in s The result is unchanged, i.e. "This is a "quoted string"". Am I doing something wrong, or are my expectations wrong, or is this a bug? Or, is there any other library that includes a simple unescape function for XML or HTML? (The Network.URI module includes an unescape function, but that's specific to URIs, naturally.) Anton