diff --git a/module/typeahead.js b/module/typeahead.js index 945e85e..6e81cf3 100644 --- a/module/typeahead.js +++ b/module/typeahead.js @@ -726,9 +726,9 @@ Typeahead.behaviours = { // Fetch the suggestions via an AJAX request let url = inst._options.list if (url.split('?', 2).length === 1) { - url = `${url}?q=${qs}` + url = `${url}?q=${encodeURIComponent(qs)}` } else { - url = `${url}&q=${qs}` + url = `${url}&q=${encodeURIComponent(qs)}` } return fetch(