Skip to content

Commit

Permalink
Merge pull request #1 from jonolock91/master
Browse files Browse the repository at this point in the history
Fixed issue with ampersands not being counted as valid characters in …
  • Loading branch information
anthonyjb authored Sep 13, 2018
2 parents ec7f937 + d9a28f9 commit 0307fdb
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 0307fdb

Please sign in to comment.