From 79af8af9baafd4463c5bbcba6564d8b9a7a3a5af Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Tue, 11 Sep 2007 13:51:57 +0200 Subject: [PATCH] fixed #276. --HG-- branch : trunk --- jinja/filters.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.26.2