diff --git a/core/misc/autocomplete.es6.js b/core/misc/autocomplete.es6.js index 5a1c156d0bbfe1d42f4ba9b53c85fe20d7d455b0..076c48a18771e54cd82ae65247f5d60ad8126a4b 100644 --- a/core/misc/autocomplete.es6.js +++ b/core/misc/autocomplete.es6.js @@ -177,12 +177,8 @@ // Remove the current input. terms.pop(); // Add the selected item. - if (ui.item.value.search(',') > 0) { - terms.push('"' + ui.item.value + '"'); - } - else { - terms.push(ui.item.value); - } + terms.push(ui.item.value); + event.target.value = terms.join(', '); // Return false to tell jQuery UI that we've filled in the value already. return false; diff --git a/core/misc/autocomplete.js b/core/misc/autocomplete.js index c2419a4c6f6ac25c196c2221ce3d20ca3ad03ce5..5d1dd0618cd9eafe424f856df4f55ae03e026a8e 100644 --- a/core/misc/autocomplete.js +++ b/core/misc/autocomplete.js @@ -101,11 +101,8 @@ terms.pop(); - if (ui.item.value.search(',') > 0) { - terms.push('"' + ui.item.value + '"'); - } else { - terms.push(ui.item.value); - } + terms.push(ui.item.value); + event.target.value = terms.join(', '); return false;