Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#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:
Blocked by: Blocking:

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 (11)

comment:1 Changed 8 years ago by Scott González

Component: ui.coreui.button

comment:2 Changed 8 years 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 7 years ago by Scott González

Milestone: 1.9.01.11.0

comment:5 Changed 7 years ago by bchiasson

Status: newopen
Summary: Buttonset Bug when radio with name = "data['page']['parse']"Button: Buttonset not applied to radio group with quotation/apostrophe in name
Version: 1.8.131.9.0

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 years ago by dalekocian

Owner: set to dalekocian
Status: openassigned

comment:7 Changed 7 years ago by dalekocian

Resolution: fixed
Status: assignedclosed

comment:8 Changed 7 years ago by Scott González

Resolution: fixed
Status: closedreopened

comment:9 Changed 7 years ago by mikesherov

Status: reopenedopen

comment:10 Changed 7 years ago by Mike Sherov

Resolution: fixed
Status: openclosed

Button: properly escape button names. Fixes #7505 - Button: Buttonset not applied to radio group with quotation/apostrophe in name.

Changeset: cc7df712cc4ca90f6d6db599c5ff91b690921581

comment:11 Changed 7 years ago by mikesherov

Milestone: 1.11.01.10.0
Note: See TracTickets for help on using tickets.