Fix go-get URL generation (#5905)
This commit is contained in:
parent
57a69ef277
commit
80098bd752
3 changed files with 5 additions and 3 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"fmt"
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
"net/url"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
|
@ -834,7 +835,7 @@ type CloneLink struct {
|
|||
|
||||
// ComposeHTTPSCloneURL returns HTTPS clone URL based on given owner and repository name.
|
||||
func ComposeHTTPSCloneURL(owner, repo string) string {
|
||||
return fmt.Sprintf("%s%s/%s.git", setting.AppURL, owner, repo)
|
||||
return fmt.Sprintf("%s%s/%s.git", setting.AppURL, url.QueryEscape(owner), url.QueryEscape(repo))
|
||||
}
|
||||
|
||||
func (repo *Repository) cloneLink(e Engine, isWiki bool) *CloneLink {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue