소스 검색

Escape elems as well

pull/10291/head
j. mccann 4 년 전
부모
커밋
8bf49596fe
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4
    0
      modules/util/url.go

+ 4
- 0
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…
취소
저장