Need to encode the query

This commit is contained in:
Lim Chee Aun 2024-01-04 22:00:27 +08:00
parent a8331375ba
commit 3989b218d0

View file

@ -172,7 +172,9 @@ export const SHORTCUTS_META = {
id: 'search',
title: ({ query }) => (query ? `"${query}"` : 'Search'),
path: ({ query }) =>
query ? `/search?q=${query}&type=statuses` : '/search',
query
? `/search?q=${encodeURIComponent(query)}&type=statuses`
: '/search',
icon: 'search',
excludeViewMode: ({ query }) => (!query ? ['multi-column'] : []),
},