
28 Mar
2008
28 Mar
'08
5:20 a.m.
On Thu, 27 Mar 2008, Anton van Straaten wrote:
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?
Tagsoup must contain such a function but it doesn't seem to export it.