From: Armin Ronacher Date: Tue, 11 Sep 2007 11:51:57 +0000 (+0200) Subject: fixed #276. X-Git-Tag: 2.0rc1~271 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=79af8af9baafd4463c5bbcba6564d8b9a7a3a5af;p=jinja2.git fixed #276. --HG-- branch : trunk --- diff --git a/jinja/filters.py b/jinja/filters.py index af05a0e..f9199a6 100644 --- a/jinja/filters.py +++ b/jinja/filters.py @@ -375,10 +375,12 @@ def do_urlencode(): if isinstance(value, dict): tmp = {} for key, value in value.iteritems(): - tmp[env.to_unicode(key)] = env.to_unicode(value) + key = env.to_unicode(key).encode(env.charset) + value = env.to_unicode(value).encode(env.charset) + tmp[key] = value return urlencode(tmp) else: - return quote(env.to_unicode(value)) + return quote(env.to_unicode(value).encode(env.charset)) return wrapped