select2
select2 copied to clipboard
ArrayAdapter.prototype.select special character parsing causes problems
No parsing is done on the data.id in case that special characters are used for the id. For example, if the value of data.id contains the character '', the selection will not work properly.
I recommend using the filter fonction to deal with this issue. Like this:
var $option = this.$element.find('option').filter(function (i, elm) { return elm.value == data.id.toString(); });