You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2020/01/28 20:16:20 UTC

[allura] 05/08: [#8333] fixes for tags & branches with unicode chars

This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit c33458d792c50d20a4175c0983fbf9a6d748809b
Author: Dave Brondsema <da...@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 9fdcc9b..6d940d6 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -611,6 +611,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 1de7045..538028f 100644
--- a/Allura/allura/lib/repository.py
+++ b/Allura/allura/lib/repository.py
@@ -191,7 +191,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(
@@ -211,7 +211,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(