Skip to content

Commit

Permalink
fix: URI encode query
Browse files Browse the repository at this point in the history
  • Loading branch information
yzqzss committed Apr 7, 2024
1 parent 869b71f commit 7655e3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/SearchForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const SearchForm = ({
layout="inline"
className="w-full items-center gap-4 justify-center sm:flex-nowrap"
onFinish={(data) => {
navigate(`/search?q=${data.keyword}&f=${data.showFull}&p=0`);
navigate(`/search?q=${encodeURIComponent(data.keyword || '')}&f=${data.showFull}&p=0`);
}}
>
<Form.Item
Expand Down

0 comments on commit 7655e3e

Please sign in to comment.