From 0d66b1cc1c8c44c041f5274f967535d62bd371e1 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 28 Sep 2018 23:56:45 -0400 Subject: pkg/context: apply EscapePound at context level Always escape template variable {{.Link}} variable and redirect calls. Relates to #5442 --- routes/repo/editor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routes/repo/editor.go') 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) } } -- cgit v1.2.3