From 7f8d084fa45db481abdf92cfe92a3c8bcccd7698 Mon Sep 17 00:00:00 2001 From: ioancole Date: Fri, 4 Sep 2020 23:01:41 +0800 Subject: [PATCH] Encode autocomplete search query --- ui/redux/actions/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/redux/actions/search.js b/ui/redux/actions/search.js index a7356c16e..e6677839f 100644 --- a/ui/redux/actions/search.js +++ b/ui/redux/actions/search.js @@ -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({