Skip to content

Commit

Permalink
fix: encode search term to support 'reserved' characters like + and o…
Browse files Browse the repository at this point in the history
…thers
  • Loading branch information
dmijatovic committed Nov 15, 2024
1 parent 70029ae commit b1bd272
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/components/form/Searchbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function Searchbox({placeholder, onSearch, delay = 400, defaultVa
wait:true,
value
})
onSearch(searchFor)
onSearch(encodeURIComponent(searchFor))
}
return () => { abort = true }
},[state,searchFor,onSearch])
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/search/SearchInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function SearchInput({
wait: true,
value
})
onSearch(searchFor)
onSearch(encodeURIComponent(searchFor))
}
return () => {
abort = true
Expand Down

0 comments on commit b1bd272

Please sign in to comment.