select2 icon indicating copy to clipboard operation
select2 copied to clipboard

ArrayAdapter.prototype.select special character parsing causes problems

Open ParadimeWeb opened this issue 11 years ago • 0 comments

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(); });

ParadimeWeb avatar Mar 15 '15 03:03 ParadimeWeb