forked from forgejo/forgejo
Fix go-get URL generation (#5905)
This commit is contained in:
parent
57a69ef277
commit
80098bd752
3 changed files with 5 additions and 3 deletions
|
@ -209,7 +209,7 @@ func Contexter() macaron.Handler {
|
|||
if err == nil && len(repo.DefaultBranch) > 0 {
|
||||
branchName = repo.DefaultBranch
|
||||
}
|
||||
prefix := setting.AppURL + path.Join(ownerName, repoName, "src", "branch", branchName)
|
||||
prefix := setting.AppURL + path.Join(url.QueryEscape(ownerName), url.QueryEscape(repoName), "src", "branch", branchName)
|
||||
c.Header().Set("Content-Type", "text/html")
|
||||
c.WriteHeader(http.StatusOK)
|
||||
c.Write([]byte(com.Expand(`<!doctype html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue