diff options
author | Unknwon <u@gogs.io> | 2018-09-28 23:56:45 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2018-09-28 23:56:45 -0400 |
commit | 0d66b1cc1c8c44c041f5274f967535d62bd371e1 (patch) | |
tree | 2d1cc270322f9a03768da18e55f12e65ec7a2511 /routes/repo/editor.go | |
parent | 1843354d88b4998a93fc0165ccca760977be3e73 (diff) |
pkg/context: apply EscapePound at context level
Always escape template variable {{.Link}} variable and redirect calls.
Relates to #5442
Diffstat (limited to 'routes/repo/editor.go')
-rw-r--r-- | routes/repo/editor.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/repo/editor.go b/routes/repo/editor.go index f33e2470..67c2be1e 100644 --- a/routes/repo/editor.go +++ b/routes/repo/editor.go @@ -286,7 +286,7 @@ func editFilePost(c *context.Context, f form.EditRepoFile, isNewFile bool) { if f.IsNewBrnach() && c.Repo.PullRequest.Allowed { c.Redirect(c.Repo.PullRequestURL(oldBranchName, f.NewBranchName)) } else { - c.Redirect(c.Repo.RepoLink + "/src/" + branchName + "/" + template.EscapePound(f.TreePath)) + c.Redirect(c.Repo.RepoLink + "/src/" + branchName + "/" + f.TreePath) } } |