summaryrefslogtreecommitdiffstats
path: root/routers/web/explore/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/explore/repo.go')
-rw-r--r--routers/web/explore/repo.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/web/explore/repo.go b/routers/web/explore/repo.go
index 83fb721a7d..dfc6261b33 100644
--- a/routers/web/explore/repo.go
+++ b/routers/web/explore/repo.go
@@ -6,7 +6,6 @@ package explore
import (
"net/http"
- "strings"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base"
@@ -73,7 +72,7 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
orderBy = models.SearchOrderByRecentUpdated
}
- keyword := strings.Trim(ctx.FormString("q"), " ")
+ keyword := ctx.FormTrim("q")
topicOnly := ctx.FormBool("topic")
ctx.Data["TopicOnly"] = topicOnly