mirror of
https://github.com/gogs/gogs.git
synced 2025-12-20 15:20:01 +01:00
gitutil: strip SSH port from submodule URL when rendering for HTML link (#7383)
Co-authored-by: Joe Chen <jc@unknwon.io>
This commit is contained in:
@@ -50,7 +50,7 @@ func InferSubmoduleURL(baseURL string, mod *git.Submodule) string {
|
||||
case "http", "https":
|
||||
raw = parsed.String()
|
||||
case "ssh":
|
||||
raw = fmt.Sprintf("http://%s%s", parsed.Host, parsed.Path)
|
||||
raw = fmt.Sprintf("http://%s%s", parsed.Hostname(), parsed.Path)
|
||||
default:
|
||||
return raw
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user