Skip to content

Commit

Permalink
escape optgroup label (fix snapappointments#1348)
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyjhol authored and avantika-gupta-jtg committed May 14, 2020
1 parent e9aa5da commit 9d3a675
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/bootstrap-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@
labelSubtext = typeof $parent.data('subtext') !== 'undefined' ? '<small class="text-muted">' + $parent.data('subtext') + '</small>' : '',
labelIcon = $parent.data('icon') ? '<span class="' + that.options.iconBase + ' ' + $parent.data('icon') + '"></span> ' : '';

label = labelIcon + '<span class="text">' + label + labelSubtext + '</span>';
label = labelIcon + '<span class="text">' + htmlEscape(label) + labelSubtext + '</span>';

if (index !== 0 && _li.length > 0) { // Is it NOT the first option of the select && are there elements in the dropdown?
liIndex++;
Expand Down

0 comments on commit 9d3a675

Please sign in to comment.