Skip to content

Commit

Permalink
Merge pull request City-of-Helsinki#251 from City-of-Helsinki/bugfix/…
Browse files Browse the repository at this point in the history
…ie11-search

Bugfix/ie11 search
  • Loading branch information
Rikuoja authored Oct 13, 2017
2 parents 7b65a47 + 18c3246 commit c0e18d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/actions/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import authedFetch from 'src/utils/authedFetch'
import { setFlashMsg } from './app'

function makeRequest(query, startDate, endDate) {
var url = `${appSettings.api_base}/search/?type=event&q=${query}&page_size=100`
var url = `${appSettings.api_base}/search/?type=event&q=${encodeURI(query)}&page_size=100`;

if(appSettings.nocache) {
url += `&nocache=${Date.now()}`
Expand Down
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 c0e18d4

Please sign in to comment.