decoding XML-ified special chars such as "

Christopher chris_mk at hotmail.com
Wed Jul 31 14:44:28 EDT 2002


For some reason it wasn't posted, but I wrote a message saying that I
read the email incorrectly (I thought it was the other way around,
trying to encode XML/HTML, just like Skip said).  Sorry about that.  I
did find the unescape module (see my post below).  Sorry again.

Chris

Skip Montanaro <skip at pobox.com> wrote in message news:<mailman.1028065548.24401.python-list at python.org>...
> chris> from xml.sax.saxutils import escape
>     chris> data = escape(orig_data)
> 
> That goes the wrong way.  I think the OP wanted to go from '"' to '"',
> not the other way around.
> 
>     chris> ... you might get by using urllib.unquote(data)
> 
> That's for unquoting stuff that's been escape for inclusion into URLs, also
> not what the OP asked for.



More information about the Python-list mailing list