Skip to content

Commit 3281a15

Browse files
authored
fix url encoding of Company (#570)
1 parent a837489 commit 3281a15

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/components/Filters/Company/CompanyTypeahead.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const CompanyTypeahead = ({ delayWait = 250, id }) => {
3636
};
3737

3838
const onInputChange = (value) => {
39-
const qs = queryString + '&text=' + value;
39+
const qs = queryString + '&text=' + encodeURIComponent(value);
4040
const uri = `${API_PLACEHOLDER}_suggest_company/${qs}`;
4141
handleFetchSearch(value, setDropdownOptions, uri);
4242
};

src/components/Filters/ZipCode/ZipCode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const ZipCode = ({ delayWait = 250 }) => {
2828
};
2929

3030
const onInputChange = (value) => {
31-
const qs = queryString + '&text=' + value;
31+
const qs = queryString + '&text=' + encodeURIComponent(value);
3232
const uri = `${API_PLACEHOLDER}_suggest_zip/${qs}`;
3333
handleFetchSearch(value, setDropdownOptions, uri);
3434
};

src/components/Search/SearchBar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const SearchBar = ({ debounceWait = 250 }) => {
6666

6767
const onSearchChange = (value) => {
6868
setInputValue(value);
69-
const uriCompany = `${API_PLACEHOLDER}_suggest_company/?text=${value}`;
69+
const uriCompany = `${API_PLACEHOLDER}_suggest_company/?text=${encodeURIComponent(value)}`;
7070
handleFetchSearch(value, setDropdownOptions, uriCompany);
7171
};
7272

0 commit comments

Comments
 (0)