2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-12-22 10:58:55 +00:00

use jquery escaping for class names/category names that otherwise cause problems

use jquery escaping for class names/category names that otherwise cause problems
This commit is contained in:
719media 2017-04-13 14:11:15 -07:00 committed by GitHub
parent cae37b9b16
commit 0c5c2fe06a

View File

@ -151,7 +151,7 @@
};
function _formatGroup(suggestion, category) {
return '<div class="autocomplete-group">' + category + '</div>';
return $('<div class="autocomplete-group" />').append(category).prop('outerHTML');
};
Autocomplete.prototype = {
@ -665,7 +665,7 @@
html += formatGroup(suggestion, value, i);
}
html += '<div class="' + className + '" data-index="' + i + '">' + formatResult(suggestion, value, i) + '</div>';
html += $('<div />').attr('data-index', i).addClass(className).append(formatResult(suggestion, value, i)).prop('outerHTML');
});
this.adjustContainerWidth();