summaryrefslogtreecommitdiffstats
path: root/routers/user/profile.go
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2017-02-11 12:00:01 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2017-02-11 12:00:01 +0800
commit3576e1ee739cc03f87e6ce98dbef2f32b517b202 (patch)
tree7eed6fa0e5bd1889807d0754b6767237b7964a5b /routers/user/profile.go
parent55f2059f711268958c2f762934039594ebfa7e56 (diff)
downloadgitea-3576e1ee739cc03f87e6ce98dbef2f32b517b202.tar.gz
gitea-3576e1ee739cc03f87e6ce98dbef2f32b517b202.zip
fix: trim the whitespaces for the search keyword (#893)
Diffstat (limited to 'routers/user/profile.go')
-rw-r--r--routers/user/profile.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/user/profile.go b/routers/user/profile.go
index cca4391a70..f0b1be3060 100644
--- a/routers/user/profile.go
+++ b/routers/user/profile.go
@@ -155,7 +155,7 @@ func Profile(ctx *context.Context) {
ctx.Data["SortType"] = "recentupdate"
}
- keyword := ctx.Query("q")
+ keyword := strings.Trim(ctx.Query("q"), " ")
ctx.Data["Keyword"] = keyword
if len(keyword) == 0 {
var total int