mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-15 19:52:52 -06:00
Merge pull request #3197 from KhaledTo/bug/3031
Fixes #3031: Select2 creates multiple tags for tags with spaces
This commit is contained in:
commit
00ffa358b2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user