Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Button: escaped the radio element's name so certain characters do not…

… break the selector. Fixed #7505 - Buttonset Bug when radio with name = "data['page']['parse']"
  • Loading branch information...
commit 1315b815c9570b72071e99f5e663e46fcd5bda5f 1 parent 51ee3be
@epascarello authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  ui/jquery.ui.button.js
View
2  ui/jquery.ui.button.js
@@ -24,7 +24,7 @@ var lastActive, startXPos, startYPos, clickDragged,
}, 1 );
},
radioGroup = function( radio ) {
- var name = radio.name,
+ var name = radio.name.replace(/([[\]:'])/g,"\\$1"),
form = radio.form,
radios = $( [] );
if ( name ) {

3 comments on commit 1315b81

@gnarf

I'm pretty sure that inside the quotes, you will only need to escape the ' Also, what backend is being used that likes data['page'] -- Just curious.

http://jsfiddle.net/gnarf/WBPFY/1/

Also, is there any chance we can add a unit test for this behavior?

@gnarf

A little more research into this issue, it seems that ' is the only character we will need to escape here. http://www.w3.org/TR/CSS2/syndata.html#tokenization http://jsfiddle.net/gnarf/WBPFY/3/

@epascarello

You are correct! Should have drank a few more cups of coffee this morning!

Please sign in to comment.
Something went wrong with that request. Please try again.