We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01f736f commit ac68e90Copy full SHA for ac68e90
routers/web/repo/find.go
@@ -8,6 +8,7 @@ import (
8
9
"code.gitea.io/gitea/modules/base"
10
"code.gitea.io/gitea/modules/context"
11
+ "code.gitea.io/gitea/modules/util"
12
)
13
14
const (
@@ -17,7 +18,7 @@ const (
17
18
// FindFiles render the page to find repository files
19
func FindFiles(ctx *context.Context) {
20
path := ctx.Params("*")
- ctx.Data["TreeLink"] = ctx.Repo.RepoLink + "/src/" + path
21
- ctx.Data["DataLink"] = ctx.Repo.RepoLink + "/tree-list/" + path
+ ctx.Data["TreeLink"] = ctx.Repo.RepoLink + "/src/" + util.PathEscapeSegments(path)
22
+ ctx.Data["DataLink"] = ctx.Repo.RepoLink + "/tree-list/" + util.PathEscapeSegments(path)
23
ctx.HTML(http.StatusOK, tplFindFiles)
24
}
0 commit comments