Skip to content

Commit 8bf4959

Browse files
committed
Escape elems as well
1 parent 55cd4a6 commit 8bf4959

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/util/url.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ func URLJoin(base string, elems ...string) string {
2828
// We do need to escape special chars here or else they can be silently discarded
2929
// in the ResolveReference call below
3030
base = PathEscapeSegments(base)
31+
for k, v := range elems {
32+
elems[k] = PathEscapeSegments(v)
33+
}
34+
3135
if !strings.HasSuffix(base, "/") {
3236
base += "/"
3337
}

0 commit comments

Comments
 (0)