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

Merge pull request #3197 from KhaledTo/bug/3031

Fixes #3031: Select2 creates multiple tags for tags with spaces
This commit is contained in:
Jeremy Stretch
2019-05-29 10:08:59 -04:00
committed by GitHub

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