We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74c1378 commit 1cdc6c3Copy full SHA for 1cdc6c3
routers/web/repo/find.go
@@ -7,6 +7,7 @@ import (
7
"net/http"
8
9
"code.gitea.io/gitea/modules/base"
10
+ "code.gitea.io/gitea/modules/util"
11
"code.gitea.io/gitea/services/context"
12
)
13
@@ -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