1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #3031: Select2 creates multiple tags for tags with spaces

This commit is contained in:
Khaled BEN ABDALLAH
2019-05-18 21:06:22 +02:00
parent edabc8eee9
commit cbace6f831

View File

@ -267,6 +267,10 @@ $(document).ready(function() {
processResults: function (data) {
var results = $.map(data.results, function (obj) {
// If tag contains space add double quotes
if (/\s/.test(obj.name))
obj.name = '"' + obj.name + '"'
return {
id: obj.name,
text: obj.name