From 30acd5c81689545ba02dfa392b118f262f3511b8 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 12 Feb 2012 21:54:05 -0600 Subject: Protect urlencode calls against Unicode data These would cause page errors if passed anything not in the ASCII character set. This change allows for packages to have names composed of any Unicode characters, not just those in the ASCII set. Signed-off-by: Dan McGee --- packages/views/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/views') diff --git a/packages/views/__init__.py b/packages/views/__init__.py index 6394247..8f22a8a 100644 --- a/packages/views/__init__.py +++ b/packages/views/__init__.py @@ -142,7 +142,7 @@ def details(request, name='', repo='', arch=''): ('q', name), ] # only include non-blank values in the query we generate - pkg_data = [(x, y) for x, y in pkg_data if y] + pkg_data = [(x, y.encode('utf-8')) for x, y in pkg_data if y] return redirect("/packages/?%s" % urlencode(pkg_data)) def groups(request, arch=None): -- cgit v1.2.3-24-g4f1b