Encode autocomplete search query

This commit is contained in:
ioancole 2020-09-04 23:01:41 +08:00 committed by Sean Yesmunt
parent 323ab43889
commit 7f8d084fa4

View file

@ -45,7 +45,7 @@ export const getSearchSuggestions = (value: string) => (dispatch: Dispatch, getS
return;
}
fetch(`${CONNECTION_STRING}autocomplete?s=${searchValue}`)
fetch(`${CONNECTION_STRING}autocomplete?s=${encodeURIComponent(searchValue)}`)
.then(handleFetchResponse)
.then(apiSuggestions => {
dispatch({