File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ var formResetHandler = function() {
30
30
form . find ( ".ui-checkboxradio" ) . checkboxradio ( "refresh" ) ;
31
31
} ) ;
32
32
} ,
33
+ escapeId = new RegExp ( / ( [ ! " # $ % & ' ( ) * + , . / : ; < = > ? @ [ \] ^ ` { | } ~ ] ) / g ) ,
33
34
radioGroup = function ( radio ) {
34
35
var name = radio . name ,
35
36
form = radio . form ,
@@ -137,7 +138,8 @@ $.widget( "ui.checkboxradio", {
137
138
ancestor = this . element . parents ( ) . last ( ) ;
138
139
139
140
// Look for the label based on the id
140
- labelSelector = "label[for='" + this . element . attr ( "id" ) + "']" ;
141
+ labelSelector = "label[for='" +
142
+ this . element . attr ( "id" ) . replace ( escapeId , "\\$1" ) + "']" ;
141
143
this . label = ancestor . find ( labelSelector ) ;
142
144
if ( ! this . label . length ) {
143
145
@@ -165,7 +167,6 @@ $.widget( "ui.checkboxradio", {
165
167
this . _setOption ( "disabled" , this . options . disabled ) ;
166
168
this . _updateIcon ( checked ) ;
167
169
this . _addClass ( "ui-checkboxradio" , "ui-helper-hidden-accessible " ) ;
168
-
169
170
this . _addClass ( this . label , "ui-checkboxradio-label" , "ui-button ui-widget" ) ;
170
171
171
172
if ( this . type === "radio" ) {
You can’t perform that action at this time.
0 commit comments