Skip to content

Commit

Permalink
michael#171 HTML encode <li> element attributes and content
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrence-ofsystems committed Feb 2, 2020
1 parent 71eda5f commit ebcc76f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion js/ui.multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,14 @@ $.widget("ui.multiselect", {
},
_getOptionNode: function(option) {
option = $(option);
var node = $('<li class="ui-state-default ui-element" title="'+option.text()+'" data-selected-value="' + option.val() + '"><span class="ui-icon"/>'+option.text()+'<a href="#" class="action"><span class="ui-corner-all ui-icon"/></a></li>').hide();
var node = $('<li>',
{
class: 'ui-state-default ui-element',
title: option.text(),
'data-selected-value': option.val()
})
.append('<span class="ui-icon"/>'+option.html()+'<a href="#" class="action"><span class="ui-corner-all ui-icon"/></a></li>')
.hide();
node.data('optionLink', option);
return node;
},
Expand Down

0 comments on commit ebcc76f

Please sign in to comment.