From 417541f116144e9628d50a2b9af4ff6c689e3739 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 9 Feb 2021 21:36:34 +0000 Subject: 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(-) (limited to 'guix-data-service') 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 "") -- cgit v1.2.3