mirror of https://github.com/gogs/gogs.git
templates/repo: escape branch name (#4601)
parent
d572381a37
commit
15f9a83618
|
@ -236,9 +236,9 @@ func runHookPostReceive(c *cli.Context) error {
|
|||
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=" +
|
||||
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) +
|
||||
"&pusher=" + os.Getenv(http.ENV_AUTH_USER_ID)
|
||||
log.Trace("Trigger task: %s", reqURL)
|
||||
|
|
2
gogs.go
2
gogs.go
|
@ -16,7 +16,7 @@ import (
|
|||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.11.47.0425"
|
||||
const APP_VER = "0.11.48.0425"
|
||||
|
||||
func init() {
|
||||
setting.AppVer = APP_VER
|
||||
|
|
|
@ -1 +1 @@
|
|||
0.11.47.0425
|
||||
0.11.48.0425
|
|
@ -25,7 +25,7 @@
|
|||
<div class="ui secondary menu">
|
||||
{{if .PullRequestCtx.Allowed}}
|
||||
<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>
|
||||
</a>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue