diff options
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r-- | modules/context/repo.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index 310aa886d3..f9e366ed48 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -8,6 +8,7 @@ package context import ( "fmt" "io/ioutil" + "net/url" "path" "strings" @@ -171,7 +172,7 @@ func RetrieveBaseRepo(ctx *Context, repo *models.Repository) { // ComposeGoGetImport returns go-get-import meta content. func ComposeGoGetImport(owner, repo string) string { - return path.Join(setting.Domain, setting.AppSubURL, owner, repo) + return path.Join(setting.Domain, setting.AppSubURL, url.QueryEscape(owner), url.QueryEscape(repo)) } // EarlyResponseForGoGetMeta responses appropriate go-get meta with status 200 |