From a442fc2b94e33346aadb74294587282710786f75 Mon Sep 17 00:00:00 2001 From: r Date: Mon, 17 Jun 2024 15:16:36 +0000 Subject: Fix URL encoding of user inputs --- service/service.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/service/service.go b/service/service.go index 4f17817..d88273f 100644 --- a/service/service.go +++ b/service/service.go @@ -160,7 +160,7 @@ func (s *service) TimelinePage(c *client, tType, q, listId, maxID, if err != nil { return err } - refreshLink += "?q=" + q + refreshLink += "?q=" + url.QueryEscape(q) } title = "Remote Timeline" case "twkn": @@ -187,7 +187,7 @@ func (s *service) TimelinePage(c *client, tType, q, listId, maxID, if err != nil { return err } - refreshLink += "?q=" + q + refreshLink += "?q=" + url.QueryEscape(q) } title = "Hashtag Timeline" } @@ -689,7 +689,7 @@ func (s *service) UserSearchPage(c *client, if len(results.Statuses) == 20 { offset += 20 nextLink = fmt.Sprintf("/usersearch/%s?q=%s&offset=%d", id, - q, offset) + url.QueryEscape(q), offset) } if len(q) > 0 { @@ -765,7 +765,7 @@ func (s *service) SearchPage(c *client, q string, qType string, offset int) ( (qType == "statuses" && len(results.Statuses) == 20) { offset += 20 nextLink = fmt.Sprintf("/search?q=%s&type=%s&offset=%d", - q, qType, offset) + url.QueryEscape(q), qType, offset) } if len(q) > 0 { -- cgit v1.2.3