Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fc87a5 commit 549171dCopy full SHA for 549171d
http/controller/search.go
@@ -3,6 +3,7 @@ package controller
3
import (
4
"html"
5
"net/http"
6
+ "net/url"
7
8
"github.com/studygolang/studygolang/context"
9
"github.com/studygolang/studygolang/logic"
@@ -53,6 +54,12 @@ func (SearchController) TagList(ctx echo.Context) error {
53
54
return render(ctx, "notfound", nil)
55
}
56
57
+ var err error
58
+ q, err = url.QueryUnescape(q)
59
+ if err != nil {
60
+ return ctx.Redirect(http.StatusSeeOther, "/")
61
+ }
62
+
63
// 过滤非法 tag
64
if len(q) > 9 {
65
return ctx.Redirect(http.StatusSeeOther, "/")
0 commit comments