From b5be0217a469c8549ab2f38e8b6f87bb498057d0 Mon Sep 17 00:00:00 2001 From: Ryan Hitchman Date: Sat, 24 Jul 2010 17:38:28 -0600 Subject: [PATCH] make .dict handle unicode properly --- plugins/util/http.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/util/http.py b/plugins/util/http.py index c125bec..548afeb 100644 --- a/plugins/util/http.py +++ b/plugins/util/http.py @@ -5,7 +5,7 @@ import urllib import urllib2 import urlparse -from urllib import quote, quote_plus +from urllib import quote, quote_plus as _quote_plus from urllib2 import HTTPError, URLError from lxml import etree, html @@ -67,3 +67,7 @@ def to_utf8(s): return s else: return s.encode('utf8', 'ignore') + + +def quote_plus(s): + return _quote_plus(to_utf8(s))