Unquote HTML-quoted strings in Python


I wasted a lot of time looking for something in Python to decode (if that is the right word, otherwise, unquote) HTML-quoted strings such as those you get back as form values. Despite using the module “urllib“ to retrieve the form values in the first place, I was not aware of the set of utility functions it offers for quoting and unquoting of values. So, here you go: Look at “unquote()“ and “unquote_plus()“.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s