allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [allura] 04/05: [#8333] fixes for tags & branches with unicode chars
Date Tue, 17 Sep 2019 19:48:00 GMT
This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/8333
in repository https://gitbox.apache.org/repos/asf/allura.git

commit ba25b71e733f6faed1522a5988327fa158688f16
Author: Dave Brondsema <dave@brondsema.net>
AuthorDate: Tue Sep 17 15:18:49 2019 -0400

    [#8333] fixes for tags & branches with unicode chars
---
 Allura/allura/controllers/repository.py | 1 +
 Allura/allura/lib/repository.py         | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index 7d3774d..99ba137 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -610,6 +610,7 @@ class CommitsController(object):
 
     @expose()
     def _lookup(self, ci, *remainder):
+        ci = unquote(ci)
         EOR = c.app.END_OF_REF_ESCAPE
         if EOR in remainder:
             i = remainder.index(EOR)
diff --git a/Allura/allura/lib/repository.py b/Allura/allura/lib/repository.py
index 6250026..60c5845 100644
--- a/Allura/allura/lib/repository.py
+++ b/Allura/allura/lib/repository.py
@@ -188,7 +188,7 @@ class RepositoryApp(Application):
             for branch in branches[:max_branches]:
                 links.append(SitemapEntry(
                     branch.name,
-                    quote(self.repo.url_for_commit(branch.name) + 'tree/')))
+                    h.urlquote(self.repo.url_for_commit(branch.name) + 'tree/')))
             if len(branches) > max_branches:
                 links.append(
                     SitemapEntry(
@@ -202,7 +202,7 @@ class RepositoryApp(Application):
             for b in tags[:max_tags]:
                 links.append(SitemapEntry(
                     b.name,
-                    quote(self.repo.url_for_commit(b.name) + 'tree/')))
+                    h.urlquote(self.repo.url_for_commit(b.name) + 'tree/')))
             if len(tags) > max_tags:
                 links.append(
                     SitemapEntry(


Mime
View raw message