An adapter for URL quoting.
It quotes unicode strings according to the recommendation in RFC 2718. Before the unicode string gets quoted, it gets encoded with UTF-8.
>>> quoter = URLQuote(u'Roki\u0161kis') >>> quoter.quote() 'Roki%C5%A1kis'>>> quoter.quote_plus() 'Roki%C5%A1kis'
And when unquoting, it assumes the unquoted string is encoded with UTF-8, and tries to convert it to unicode.
>>> quoter = URLQuote('Roki%C5%A1kis') >>> quoter.unquote() u'Roki\u0161kis'>>> quoter.unquote_plus() u'Roki\u0161kis'
If the unquoted string can't be converted to unicode, the unquoted string is returned.
>>> quoter = URLQuote('S%F6derk%F6ping') >>> quoter.unquote() 'S\xf6derk\xf6ping'>>> quoter.unquote_plus() 'S\xf6derk\xf6ping'
There are no attributes in this class.
quote()
Return the object's URL quote representation.
quote_plus()
Return the object's URL quote_plus representation.
unquote()
Return the object's URL unquote representation.
unquote_plus()
Return the object's URL unquote_plus representation.
There are no known subclasses.