mirror of
https://github.com/gogs/gogs.git
synced 2025-12-20 23:30:00 +01:00
templates/repo: escape branch name (#4601)
This commit is contained in:
@@ -236,9 +236,9 @@ func runHookPostReceive(c *cli.Context) error {
|
|||||||
log.Error(2, "PushUpdate: %v", err)
|
log.Error(2, "PushUpdate: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ask for running deliver hook and test pull request tasks.
|
// Ask for running deliver hook and test pull request tasks
|
||||||
reqURL := setting.LocalURL + options.RepoUserName + "/" + options.RepoName + "/tasks/trigger?branch=" +
|
reqURL := setting.LocalURL + options.RepoUserName + "/" + options.RepoName + "/tasks/trigger?branch=" +
|
||||||
strings.TrimPrefix(options.RefFullName, git.BRANCH_PREFIX) +
|
template.EscapePound(strings.TrimPrefix(options.RefFullName, git.BRANCH_PREFIX)) +
|
||||||
"&secret=" + os.Getenv(http.ENV_REPO_OWNER_SALT_MD5) +
|
"&secret=" + os.Getenv(http.ENV_REPO_OWNER_SALT_MD5) +
|
||||||
"&pusher=" + os.Getenv(http.ENV_AUTH_USER_ID)
|
"&pusher=" + os.Getenv(http.ENV_AUTH_USER_ID)
|
||||||
log.Trace("Trigger task: %s", reqURL)
|
log.Trace("Trigger task: %s", reqURL)
|
||||||
|
|||||||
2
gogs.go
2
gogs.go
@@ -16,7 +16,7 @@ import (
|
|||||||
"github.com/gogits/gogs/pkg/setting"
|
"github.com/gogits/gogs/pkg/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.11.47.0425"
|
const APP_VER = "0.11.48.0425"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
setting.AppVer = APP_VER
|
setting.AppVer = APP_VER
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
0.11.47.0425
|
0.11.48.0425
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<div class="ui secondary menu">
|
<div class="ui secondary menu">
|
||||||
{{if .PullRequestCtx.Allowed}}
|
{{if .PullRequestCtx.Allowed}}
|
||||||
<div class="fitted item">
|
<div class="fitted item">
|
||||||
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch}}...{{.PullRequestCtx.HeadInfo}}">
|
<a href="{{.BaseRepo.Link}}/compare/{{EscapePound .BaseRepo.DefaultBranch}}...{{EscapePound .PullRequestCtx.HeadInfo}}">
|
||||||
<button class="ui green small button"><i class="octicon octicon-git-compare"></i></button>
|
<button class="ui green small button"><i class="octicon octicon-git-compare"></i></button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user