From d9a28f9418a1b14eb8649e61e2644b07d5288e00 Mon Sep 17 00:00:00 2001 From: Jono Date: Thu, 13 Sep 2018 14:53:24 +0100 Subject: [PATCH] Fixed issue with ampersands not being counted as valid characters in a query --- module/typeahead.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(