mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
fix: trim the whitespaces for the search keyword (#893)
This commit is contained in:
parent
55f2059f71
commit
3576e1ee73
7 changed files with 14 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue