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:
@ -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
|
||||
|
Reference in New Issue
Block a user