encode search query before navigating

This commit is contained in:
Sean Yesmunt 2019-04-19 14:47:25 -04:00
parent af4b34146e
commit 538cf4dc46

View file

@ -22,7 +22,7 @@ const select = state => ({
const perform = (dispatch, ownProps) => ({ const perform = (dispatch, ownProps) => ({
onSearch: query => { onSearch: query => {
ownProps.history.push({ pathname: `/$/search`, search: `?q=${query}` }); ownProps.history.push({ pathname: `/$/search`, search: `?q=${encodeURIComponent(query)}` });
analytics.apiLogSearch(); analytics.apiLogSearch();
}, },
onSubmit: uri => { onSubmit: uri => {