From 1c416b97e6a9f3d6bf5f8747bd10ed1ca9cad68c Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 21 Aug 2012 00:02:57 -0500 Subject: Revert "Fix scm_link for Unicode characters" This reverts commit cd51842ce86c44eef4e3c3d5334aca13e234151a. It turns out cgit doesn't like it if you escape the '/' in the URL parameter when viewing the log (a clear upstream bug), but we need to be able to work around this. Example: 'extra%2Fkdelibs' and 'extra/kdelibs' are handled differently. --- packages/templatetags/package_extras.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'packages') diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py index a0ee8bee..9daecd96 100644 --- a/packages/templatetags/package_extras.py +++ b/packages/templatetags/package_extras.py @@ -91,12 +91,11 @@ def packager_link(user): @register.simple_tag def scm_link(package, operation): - parts = (package.repo.svn_root, operation) - url = "https://projects.archlinux.org/svntogit/%s.git/%s/trunk" % parts - data = { - 'h': 'packages/%s' % package.pkgbase - } - return link_encode(url, data) + parts = (package.repo.svn_root, operation, package.pkgbase) + linkbase = ( + "https://projects.archlinux.org/svntogit/%s.git/%s/trunk?" + "h=packages/%s") + return linkbase % tuple(urlquote(part) for part in parts) @register.simple_tag def get_wiki_link(package): -- cgit v1.2.3-2-g168b