diff options
author | Unknwon <u@gogs.io> | 2016-08-14 23:02:14 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-14 23:52:24 -0700 |
commit | cd89f6c5021ef129ecc4652aa620a3562ae30979 (patch) | |
tree | bf476d81479f249d5a1cfb195af2fdee3890d9a1 /routers/repo/branch.go | |
parent | 660e7a178a9d72a03d13f704aca61726b4672232 (diff) |
Web editor: improve edit file and diff preview
Diffstat (limited to 'routers/repo/branch.go')
-rw-r--r-- | routers/repo/branch.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/repo/branch.go b/routers/repo/branch.go index 7b8940a9..c8407114 100644 --- a/routers/repo/branch.go +++ b/routers/repo/branch.go @@ -40,14 +40,14 @@ func NewBranchPost(ctx *context.Context, form auth.NewBranchForm) { branchName := form.BranchName if ctx.HasError() || !ctx.Repo.IsWriter() || branchName == oldBranchName { - ctx.Redirect(EscapeUrl(ctx.Repo.RepoLink + "/src/" + oldBranchName)) + ctx.Redirect(ctx.Repo.RepoLink + "/src/" + oldBranchName) return } branchName = url.QueryEscape(strings.Replace(strings.Trim(branchName, " "), " ", "-", -1)) if _, err := ctx.Repo.Repository.GetBranch(branchName); err == nil { - ctx.Redirect(EscapeUrl(ctx.Repo.RepoLink + "/src/" + branchName)) + ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName) return } @@ -77,5 +77,5 @@ func NewBranchPost(ctx *context.Context, form auth.NewBranchForm) { models.HookQueue.Add(ctx.Repo.Repository.ID) } - ctx.Redirect(EscapeUrl(ctx.Repo.RepoLink + "/src/" + branchName)) + ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName) } |