diff options
Diffstat (limited to 'routers/web/explore/code.go')
-rw-r--r-- | routers/web/explore/code.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/routers/web/explore/code.go b/routers/web/explore/code.go index 55a4409145..a9b159468d 100644 --- a/routers/web/explore/code.go +++ b/routers/web/explore/code.go @@ -6,7 +6,6 @@ package explore import ( "net/http" - "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" @@ -33,14 +32,14 @@ func Code(ctx *context.Context) { ctx.Data["PageIsExplore"] = true ctx.Data["PageIsExploreCode"] = true - language := strings.TrimSpace(ctx.FormString("l")) - keyword := strings.TrimSpace(ctx.FormString("q")) + language := ctx.FormTrim("l") + keyword := ctx.FormTrim("q") page := ctx.FormInt("page") if page <= 0 { page = 1 } - queryType := strings.TrimSpace(ctx.FormString("t")) + queryType := ctx.FormTrim("t") isMatch := queryType == "match" var ( |