guix-commits
[Top][All Lists]
Advanced

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

01/02: URI encode some derivation names in links


From: Christopher Baines
Subject: 01/02: URI encode some derivation names in links
Date: Sun, 10 Sep 2023 04:58:00 -0400 (EDT)

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

commit e8e14597696504c9147a26abbba41ebf04c571af
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Thu Sep 7 11:14:11 2023 +0100

    URI encode some derivation names in links
    
    To handle characters like +.
---
 guix-data-service/web/compare/html.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/guix-data-service/web/compare/html.scm 
b/guix-data-service/web/compare/html.scm
index 44acb81..6979e42 100644
--- a/guix-data-service/web/compare/html.scm
+++ b/guix-data-service/web/compare/html.scm
@@ -930,7 +930,7 @@ enough builds to determine a change")))
                                              ,target))
                                    (td ,@(if base-derivation-file-name
                                              `((a (@ (style "display: block;")
-                                                     (href 
,base-derivation-file-name))
+                                                     (href 
,(uri-encode-filename base-derivation-file-name)))
                                                   (span (@ (class "text-danger 
glyphicon glyphicon-minus pull-left")
                                                            (style "font-size: 
1.5em; padding-right: 0.4em;")))
                                                   
,@(build-statuses->build-status-labels
@@ -939,7 +939,7 @@ enough builds to determine a change")))
                                              '())
                                        ,@(if target-derivation-file-name
                                              `((a (@ (style "display: block; 
clear: left;")
-                                                     (href 
,target-derivation-file-name))
+                                                     (href 
,(uri-encode-filename target-derivation-file-name)))
                                                   (span (@ (class 
"text-success glyphicon glyphicon-plus pull-left")
                                                            (style "font-size: 
1.5em; padding-right: 0.4em;")))
                                                   
,@(build-statuses->build-status-labels
@@ -955,9 +955,9 @@ enough builds to determine a change")))
                                                       ,(string-append
                                                         "/compare/derivation?"
                                                         "base_derivation="
-                                                        
base-derivation-file-name
+                                                        (uri-encode-filename 
base-derivation-file-name)
                                                         "&target_derivation="
-                                                        
target-derivation-file-name)))
+                                                        (uri-encode-filename 
target-derivation-file-name))))
                                                   "⇕ Compare"))
                                              '()))))))
                             system-and-versions)))



reply via email to

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