diff options
author | Dan McGee <dan@archlinux.org> | 2012-02-12 21:54:05 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-02-12 21:54:05 -0600 |
commit | 30acd5c81689545ba02dfa392b118f262f3511b8 (patch) | |
tree | 393d3b50680a9d997df7d0ecbf20d24fe83997d8 /packages/views | |
parent | c3ebf7deae0bb04f1637e9a52e7f9f38d454fec7 (diff) |
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 <dan@archlinux.org>
Diffstat (limited to 'packages/views')
-rw-r--r-- | packages/views/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/views/__init__.py b/packages/views/__init__.py index 63942474..8f22a8a1 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): |