Skip to content

Commit 026f5da

Browse files
committed
Fix url encoding
1 parent 9535b4c commit 026f5da

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/Search/Search.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const Search: Component<{
5959
props.onInputConfirm(q);
6060
}
6161
else {
62-
navigate(`/search/${q.replaceAll('#', '%23')}`);
62+
navigate(`/search/${urlSafe.replaceAll('#', '%23')}`);
6363
}
6464
onBlur();
6565
resetQuery();

src/contexts/AdvancedSearchContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ export function AdvancedSearchProvider(props: { children: JSX.Element }) {
287287

288288
try {
289289

290-
const spec = JSON.stringify({ id: 'advsearch', query });
290+
const spec = JSON.stringify({ id: 'advsearch', query: encodeURIComponent(query) });
291291

292292
updateStore('isFetchingContent' , () => true);
293293

0 commit comments

Comments
 (0)