diff --git a/src/pages/api/search/searchSuggestion.js b/src/pages/api/search/searchSuggestion.js index d44dbe79..c1c936c9 100644 --- a/src/pages/api/search/searchSuggestion.js +++ b/src/pages/api/search/searchSuggestion.js @@ -19,5 +19,5 @@ export default async function handler(req, res) { return res.json([query, []]); // Responde with the same array format but with no suggestions. } - return res.send(await cachedFetch(`${provider.suggestionUrl}${query}`, 5)); + return res.send(await cachedFetch(`${provider.suggestionUrl}${encodeURIComponent(query)}`, 5)); }