We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d80f57b commit 98d0dbcCopy full SHA for 98d0dbc
ui/jquery.ui.selectmenu.js
@@ -30,6 +30,7 @@ $.widget("ui.selectmenu", {
30
maxHeight: null,
31
icons: null,
32
format: null,
33
+ escapeHtml: false,
34
bgImage: function() {},
35
wrapperElement: "<div />"
36
},
@@ -624,9 +625,14 @@ $.widget("ui.selectmenu", {
624
625
this.open(event);
626
}
627
-
628
+
629
_formatText: function(text) {
- return (this.options.format ? this.options.format(text) : text);
630
+ if (this.options.format) {
631
+ text = this.options.format(text);
632
+ } else if (this.options.escapeHtml) {
633
+ text = $('<div />').text(text).html();
634
+ }
635
+ return text;
636
637
638
_selectedIndex: function() {
0 commit comments