diff options
author | Christopher Baines <mail@cbaines.net> | 2021-02-09 21:36:34 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-02-09 21:36:34 +0000 |
commit | 417541f116144e9628d50a2b9af4ff6c689e3739 (patch) | |
tree | 20eabe86375bd42d8d27f6c999a3b62d841fca40 /guix-data-service | |
parent | 146ffbe5eb5469615c7ac1ba01421c39c863022e (diff) | |
download | data-service-417541f116144e9628d50a2b9af4ff6c689e3739.tar data-service-417541f116144e9628d50a2b9af4ff6c689e3739.tar.gz |
Properly encode branch names in links
At least from the home page, this fixes links where the branch name contains a
/.
Diffstat (limited to 'guix-data-service')
-rw-r--r-- | guix-data-service/web/view/html.scm | 10 |
1 files 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 "") |