summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-08-21 07:02:57 +0200
committerDan McGee <dan@archlinux.org>2012-08-21 07:02:57 +0200
commit1c416b97e6a9f3d6bf5f8747bd10ed1ca9cad68c (patch)
tree71e96853d8dbc68463beae6aff143b90fda7f553 /packages
parentcd51842ce86c44eef4e3c3d5334aca13e234151a (diff)
downloadarchweb-1c416b97e6a9f3d6bf5f8747bd10ed1ca9cad68c.tar.gz
archweb-1c416b97e6a9f3d6bf5f8747bd10ed1ca9cad68c.tar.xz
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.
Diffstat (limited to 'packages')
-rw-r--r--packages/templatetags/package_extras.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py
index a0ee8be..9daecd9 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):