Skip to content

Commit

Permalink
Selectmenu: use text() instead of html() as the option and optgroup i…
Browse files Browse the repository at this point in the history
…s read as text
  • Loading branch information
fnagel committed Dec 3, 2012
1 parent cba09da commit 60e3302
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/jquery.ui.selectmenu.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ $.widget( "ui.selectmenu", {
if ( item.optgroup !== currentOptgroup ) { if ( item.optgroup !== currentOptgroup ) {
$( "<li />", { $( "<li />", {
"class": "ui-selectmenu-optgroup" + ( item.element.parent( "optgroup" ).attr( "disabled" ) ? " ui-state-disabled" : "" ), "class": "ui-selectmenu-optgroup" + ( item.element.parent( "optgroup" ).attr( "disabled" ) ? " ui-state-disabled" : "" ),
html: item.optgroup text: item.optgroup
}).appendTo( ul ); }).appendTo( ul );
currentOptgroup = item.optgroup; currentOptgroup = item.optgroup;
} }
Expand All @@ -274,7 +274,7 @@ $.widget( "ui.selectmenu", {
li.addClass( "ui-state-disabled" ); li.addClass( "ui-state-disabled" );
} }
li.append( $( "<a />", { li.append( $( "<a />", {
html: item.label, text: item.label,
href: "#" href: "#"
}) })
); );
Expand Down

0 comments on commit 60e3302

Please sign in to comment.