]> source.dussan.org Git - redmine.git/commitdiff
Fixes error in autocomplete (@ActionController::BadRequest (Invalid query parameters...
authorMarius Balteanu <marius.balteanu@zitec.com>
Mon, 26 Feb 2024 21:32:54 +0000 (21:32 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Mon, 26 Feb 2024 21:32:54 +0000 (21:32 +0000)
Patch by Abe Tomoaki (@abetomo).

git-svn-id: https://svn.redmine.org/redmine/trunk@22740 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/assets/javascripts/application.js

index 007fa6a4138a01ef487bf8b634b975c5ed5a579b..89429833f0c5c9f21aed585f4ac06ac2f1b77e7e 100644 (file)
@@ -1167,7 +1167,7 @@ function inlineAutoComplete(element) {
             if (event.target.type === 'text' && $(element).attr('autocomplete') != 'off') {
               $(element).attr('autocomplete', 'off');
             }
-            remoteSearch(getDataSource('issues') + text, function (issues) {
+            remoteSearch(getDataSource('issues') + encodeURIComponent(text), function (issues) {
               return cb(issues);
             });
           },
@@ -1189,7 +1189,7 @@ function inlineAutoComplete(element) {
         {
           trigger: '[[',
           values: function (text, cb) {
-            remoteSearch(getDataSource('wiki_pages') + text, function (wikiPages) {
+            remoteSearch(getDataSource('wiki_pages') + encodeURIComponent(text), function (wikiPages) {
               return cb(wikiPages);
             });
           },
@@ -1211,7 +1211,7 @@ function inlineAutoComplete(element) {
           values: function (text, cb) {
             const url = getDataSource('users');
             if (url) {
-              remoteSearch(url + text, function (users) {
+              remoteSearch(url + encodeURIComponent(text), function (users) {
                 return cb(users);
               });
             }