summaryrefslogtreecommitdiffstats
path: root/routers/repo/view.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/view.go')
-rw-r--r--routers/repo/view.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go
index 38260d2bec..d43b4d7f78 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -297,9 +297,9 @@ func renderCode(ctx *context.Context) {
ctx.Data["Title"] = title
ctx.Data["RequireHighlightJS"] = true
- branchLink := ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchName
+ branchLink := ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()
treeLink := branchLink
- rawLink := ctx.Repo.RepoLink + "/raw/" + ctx.Repo.BranchName
+ rawLink := ctx.Repo.RepoLink + "/raw/" + ctx.Repo.BranchNameSubURL()
if len(ctx.Repo.TreePath) > 0 {
treeLink += "/" + ctx.Repo.TreePath