guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Properly encode branch names in links


From: Christopher Baines
Subject: branch master updated: Properly encode branch names in links
Date: Tue, 09 Feb 2021 16:37:26 -0500

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository data-service.

The following commit(s) were added to refs/heads/master by this push:
     new 417541f  Properly encode branch names in links
417541f is described below

commit 417541f116144e9628d50a2b9af4ff6c689e3739
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Tue Feb 9 21:36:34 2021 +0000

    Properly encode branch names in links
    
    At least from the home page, this fixes links where the branch name 
contains a
    /.
---
 guix-data-service/web/view/html.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/guix-data-service/web/view/html.scm 
b/guix-data-service/web/view/html.scm
index f949331..8063e17 100644
--- a/guix-data-service/web/view/html.scm
+++ b/guix-data-service/web/view/html.scm
@@ -26,6 +26,7 @@
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-19)
+  #:use-module (web uri)
   #:use-module (texinfo)
   #:use-module (texinfo html)
   #:use-module (json)
@@ -368,9 +369,12 @@ time."
           ((name commit date revision-exists? job-events)
            `(tr
              (td
-              (a (@ (href ,(string-append
-                            "/repository/" (number->string git-repository-id)
-                            "/branch/" name)))
+              (a (@ (href ,(encode-and-join-uri-path
+                            (list
+                             "repository"
+                             (number->string git-repository-id)
+                             "branch"
+                             name))))
                  ,name))
              (td ,date)
              (td ,@(if (string=? commit "")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]