From f6ceda79d65bccb9c64798b74c56697b015e63dd Mon Sep 17 00:00:00 2001 From: keyan Date: Wed, 18 May 2022 16:15:44 -0500 Subject: [PATCH] encode search query before searching --- components/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/search.js b/components/search.js index ce3de1a2..a17e6b15 100644 --- a/components/search.js +++ b/components/search.js @@ -41,7 +41,7 @@ export default function Search ({ sub }) { if (sub) { prefix = `/~${sub}` } - router.push(prefix + `/search?q=${q}`) + router.push(prefix + `/search?q=${encodeURIComponent(q)}`) } }} >