1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-12 12:38:20 +00:00

Fix go-get URL generation (#5905) (#5907)

This commit is contained in:
Lauris BH
2019-01-30 23:29:44 +02:00
committed by GitHub
parent 0190d3c243
commit 3f802a2846
3 changed files with 5 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ import (
"fmt"
"html/template"
"io/ioutil"
"net/url"
"os"
"os/exec"
"path"
@@ -824,7 +825,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 {