Ticket #7505 (closed bug: fixed)
Button: Buttonset not applied to radio group with quotation/apostrophe in name
| Reported by: | meotimdihia | Owned by: | dalekocian |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.10.0 |
| Component: | ui.button | Version: | 1.9.0 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
BUTTON SET is bug with this code:
<form>
<div id="radio">
<input type="radio" id="radio1" name="data['Page']['parse']" /><label for="radio1">Choice 1</label>
<input type="radio" id="radio2" name="data['Page']['parse']" checked="checked" /><label for="radio2">Choice 2</label>
<input type="radio" id="radio3" name="data['Page']['parse']" /><label for="radio3">Choice 3</label>
</div>
</form>
</div><!-- End demo -->
<script>
$(function() {
$( "#radio" ).buttonset();
});
</script>
Change History
comment:2 Changed 22 months ago by epascarello
Problem here is it grabs the name
var name = radio.name,
and than builds a selector:
radios = $( form ).find( "[name='" + name + "']" );
Looks like : ' [ ] would need to be escaped
comment:3 Changed 22 months ago by epascarello
Made a change: https://github.com/epascarello/jquery-ui/commit/1315b815c9570b72071e99f5e663e46fcd5bda5f
Made a pull request: https://github.com/jquery/jquery-ui/pull/401
comment:5 Changed 7 months ago by bchiasson
- Status changed from new to open
- Version changed from 1.8.13 to 1.9.0
- Summary changed from Buttonset Bug when radio with name = "data['page']['parse']" to Button: Buttonset not applied to radio group with quotation/apostrophe in name
The issue arises when the string delimiter "'" is placed into the name attribute. The link below is the tickets code.
comment:6 Changed 7 months ago by dalekocian
- Owner set to dalekocian
- Status changed from open to assigned
comment:7 Changed 7 months ago by dalekocian
- Status changed from assigned to closed
- Resolution set to fixed
comment:8 Changed 7 months ago by scott.gonzalez
- Status changed from closed to reopened
- Resolution fixed deleted
comment:10 Changed 6 months ago by Mike Sherov
- Status changed from open to closed
- Resolution set to fixed
Button: properly escape button names. Fixes #7505 - Button: Buttonset not applied to radio group with quotation/apostrophe in name.
Changeset: cc7df712cc4ca90f6d6db599c5ff91b690921581
Note: See
TracTickets for help on using
tickets.

