Ticket #7505 (closed bug: fixed)

Opened 2 years ago

Last modified 6 months ago

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:1 Changed 2 years ago by scott.gonzalez

  • Component changed from ui.core to ui.button

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:4 Changed 8 months ago by scott.gonzalez

  • Milestone changed from 1.9.0 to 1.11.0

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.

 http://jsfiddle.net/bchiasson/Gn6Kz/2/

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:9 Changed 7 months ago by mikesherov

  • Status changed from reopened to open

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

comment:11 Changed 6 months ago by mikesherov

  • Milestone changed from 1.11.0 to 1.10.0
Note: See TracTickets for help on using tickets.