Skip to content

Commit

Permalink
Fixed issue with ampersands not being counted as valid characters in …
Browse files Browse the repository at this point in the history
…a query
  • Loading branch information
Jono committed Sep 13, 2018
1 parent ec7f937 commit d9a28f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit d9a28f9

Please sign in to comment.