aboutsummaryrefslogtreecommitdiff
path: root/url.go
diff options
context:
space:
mode:
Diffstat (limited to 'url.go')
-rw-r--r--url.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/url.go b/url.go
index d391de2..8be7047 100644
--- a/url.go
+++ b/url.go
@@ -98,3 +98,10 @@ func redirect_without_slash(w http.ResponseWriter, r *http.Request) bool {
}
return false
}
+
+func path_escape_cat_segments(segments []string) string {
+ for i, segment := range segments {
+ segments[i] = url.PathEscape(segment)
+ }
+ return strings.Join(segments, "/")
+}