Browse Source

Escape elems as well

pull/10291/head
j. mccann 5 years ago
parent
commit
8bf49596fe
  1. 4
      modules/util/url.go

4
modules/util/url.go

@ -28,6 +28,10 @@ func URLJoin(base string, elems ...string) string {
// We do need to escape special chars here or else they can be silently discarded
// in the ResolveReference call below
base = PathEscapeSegments(base)
for k, v := range elems {
elems[k] = PathEscapeSegments(v)
}
if !strings.HasSuffix(base, "/") {
base += "/"
}

Loading…
Cancel
Save