Search: cannot search for names containing slashes
fix is to `urlEncode` the query component
@@ -22,9 +22,12 @@ export function store($http, BaseApiUrl) {
const BASE = `${BaseApiUrl}/entity-search`;
- const search = (query, options) => $http
- .post(`${BASE}/${query}`, options)
+ const search = (query, options) => {
+ const encodedQuery = encodeURIComponent(query);
+ return $http
+ .post(`${BASE}/${encodedQuery}`, options)
.then(result => result.data);
+ };
return {
search
