diff options
author | 6543 <6543@obermui.de> | 2021-08-11 17:08:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-11 18:08:52 +0300 |
commit | f1a810e0901b80eb6bc21103434fc0737af17eaa (patch) | |
tree | 9656d780cf19fd745f41eef0012701458aa271c4 /routers/web/org/home.go | |
parent | 2d25b7d44bedf8f17cc2b49f39d1cee662b199a5 (diff) | |
download | gitea-f1a810e0901b80eb6bc21103434fc0737af17eaa.tar.gz gitea-f1a810e0901b80eb6bc21103434fc0737af17eaa.zip |
Related refactors to ctx.FormX functions (#16567)
* use FormTrim if posible
* speedup goGet
* only convert if nessesary
Diffstat (limited to 'routers/web/org/home.go')
-rw-r--r-- | routers/web/org/home.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/web/org/home.go b/routers/web/org/home.go index de131d27b6..da53053c7f 100644 --- a/routers/web/org/home.go +++ b/routers/web/org/home.go @@ -6,7 +6,6 @@ package org import ( "net/http" - "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" @@ -78,7 +77,7 @@ func Home(ctx *context.Context) { orderBy = models.SearchOrderByRecentUpdated } - keyword := strings.Trim(ctx.FormString("q"), " ") + keyword := ctx.FormTrim("q") ctx.Data["Keyword"] = keyword page := ctx.FormInt("page") |