From 70bbb05bf25b2daf818bb4f9599fa5f7fcb1a2d4 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Thu, 10 Dec 2020 15:27:28 +0200 Subject: [PATCH] fix hashtag disappearing in u query params --- pages/u/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pages/u/index.tsx b/pages/u/index.tsx index bfe0afb5c..22cdcd81c 100644 --- a/pages/u/index.tsx +++ b/pages/u/index.tsx @@ -37,7 +37,13 @@ const UserSearchPage = ({ users }: Props) => { if (debouncedFilter.length < 3) { router.push(`/u`, undefined, { shallow: true }); } else { - router.push(`/u?filter=${debouncedFilter}`, undefined, { shallow: true }); + router.push( + `/u?filter=${encodeURIComponent(debouncedFilter)}`, + undefined, + { + shallow: true, + } + ); } }, [debouncedFilter]);