From 7f718878e7280f0ea415df4c09450fe18a1f954e Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Tue, 19 Mar 2024 12:53:15 +0530 Subject: [PATCH] refactor: escape characters in search query --- .../src/helpers/teams/TeamsSearch.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/hoppscotch-common/src/helpers/teams/TeamsSearch.service.ts b/packages/hoppscotch-common/src/helpers/teams/TeamsSearch.service.ts index d2fda52fe02..c14d67495c6 100644 --- a/packages/hoppscotch-common/src/helpers/teams/TeamsSearch.service.ts +++ b/packages/hoppscotch-common/src/helpers/teams/TeamsSearch.service.ts @@ -201,7 +201,9 @@ export class TeamSearchService extends Service { try { const searchResponse = await axios.get( - `${this.endpoint}/team-collection/search/${teamID}/${query}`, + `${this.endpoint}/team-collection/search/${teamID}/${encodeURIComponent( + query + )}}`, { withCredentials: true, }