fix: trim the whitespaces for the search keyword (#893)

This commit is contained in:
Bo-Yi Wu 2017-02-11 12:00:01 +08:00 committed by Lunny Xiao
parent 55f2059f71
commit 3576e1ee73
7 changed files with 14 additions and 11 deletions

View file

@ -145,7 +145,7 @@ func Issues(ctx *context.Context) {
milestoneID := ctx.QueryInt64("milestone")
isShowClosed := ctx.Query("state") == "closed"
keyword := ctx.Query("q")
keyword := strings.Trim(ctx.Query("q"), " ")
if bytes.Contains([]byte(keyword), []byte{0x00}) {
keyword = ""
}