Julian Foad wrote:
> I searched on the web and didn't find a really really simple way to
> escape a set of characters. I think something like
>
>   for c in chars_to_remove:
>     data = data.replace(c, '%%%0x' % ord(c))
>
> would do it.
>   

Please read what I wrote earlier. Second, this is URL escaping, not XML
quoting. But first, there is no way to represent such control chars in
XML. Only CR and LF are valid according the the XML spec. Others are
not; and you can't use character references, e.g.,  to represent
ESC. That's not valid XML.

-- Brane

Reply via email to