Skip to content

Commit

Permalink
Add encodeURI to autocomplete fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jussiarpalahti committed Oct 12, 2017
1 parent d25b6fa commit 18c3246
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/HelFormFields/HelAutoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class HelAutoComplete extends React.Component {
getOptions(input) {
let self = this
this.setState({isLoading: true});
return fetch(this.props.dataSource + input)
return fetch(this.props.dataSource + encodeURI(input))
.then((response) => {
return response.json();
}).then((json) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/HelFormFields/HelSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class HelSelect extends React.Component {
}

getOptions(input) {
return fetch(this.props.dataSource + input)
return fetch(this.props.dataSource + encodeURI(input))
.then((response) => {
return response.json();
}).then((json) => {
Expand Down

0 comments on commit 18c3246

Please sign in to comment.