Skip to content

Commit cbfec9d

Browse files
committed
fix url param
1 parent ee789f6 commit cbfec9d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

routers/web/user/notification.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"errors"
99
"fmt"
1010
"net/http"
11+
"net/url"
1112
"strings"
1213

1314
"code.gitea.io/gitea/models"
@@ -86,7 +87,7 @@ func getNotifications(c *context.Context) {
8687
// redirect to last page if request page is more than total pages
8788
pager := context.NewPagination(int(total), perPage, page, 5)
8889
if pager.Paginater.Current() < page {
89-
c.Redirect(fmt.Sprintf("%s/notifications?q=%s&page=%d", setting.AppSubURL, c.FormString("q"), pager.Paginater.Current()))
90+
c.Redirect(fmt.Sprintf("%s/notifications?q=%s&page=%d", setting.AppSubURL, url.QueryEscape(c.FormString("q")), pager.Paginater.Current()))
9091
return
9192
}
9293

0 commit comments

Comments
 (0)