aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.go b/main.go
index 913b0a2..1da5f8e 100644
--- a/main.go
+++ b/main.go
@@ -50,12 +50,14 @@ func renderDirectory(w http.ResponseWriter, tpl *template.Template, hostport str
50 } else { 50 } else {
51 hostport = fmt.Sprintf("%s:%d", x.Host, x.Port) 51 hostport = fmt.Sprintf("%s:%d", x.Host, x.Port)
52 } 52 }
53 path := url.QueryEscape(x.Selector)
54 path = strings.Replace(path, "%2F", "/", -1)
53 tr.Link = template.URL( 55 tr.Link = template.URL(
54 fmt.Sprintf( 56 fmt.Sprintf(
55 "/%s/%s%s", 57 "/%s/%s%s",
56 hostport, 58 hostport,
57 string(byte(x.Type)), 59 string(byte(x.Type)),
58 url.QueryEscape(x.Selector), 60 path,
59 ), 61 ),
60 ) 62 )
61 } 63 }