Search and Top Navigation
#7534 closed bug (fixed)
Opened July 06, 2011 05:21PM UTC
Closed August 04, 2011 03:16AM UTC
Last modified January 20, 2012 05:19PM UTC
Button label selector omits quotes / fails for ids with ":"
Reported by: | jabouillei | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.8.16 |
Component: | ui.button | Version: | 1.8.14 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The button label selector uses the id of the checkbox
without quoting it. Here is the relevent line of
UI Button code:
labelSelector = "label[for=" + this.element.attr("id") + "]";
If the id contains a colon or some other interesting character
labelSelector becomes, for example,
label[for=sample:123]
instead of
label[for="sample:123"]
Here is a jsfiddle demonstrating the problem:
I encountered the problem in 1.8.11 and reproduced it in 1.8.14.
The fix is trivial:
labelSelector = "label[for=\\"" + this.element.attr("id") + "\\"]";
I'm making this change in a github fork and will request a pull
in a few minutes.
Attachments (0)
Change History (5)
Changed July 06, 2011 05:32PM UTC by comment:1
Changed August 04, 2011 03:16AM UTC by comment:2
resolution: | → fixed |
---|---|
status: | new → closed |
Button: Adding quotes to the attribute selector for labels - Fixes #7534 - Button label selector omits quotes / fails for ids with ":"
Changeset: 065aef537b7533046907fcffc6896949e44679eb
Changed August 04, 2011 03:19AM UTC by comment:3
Button: Adding quotes to the attribute selector for labels - Fixes #7534 - Button label selector omits quotes / fails for ids with ":"
(cherry picked from commit 065aef537b7533046907fcffc6896949e44679eb)
Conflicts:
ui/jquery.ui.button.js
Changeset: 07d5271f7eac17a1a732b562b836b12a889e3b60
Changed August 04, 2011 03:55AM UTC by comment:4
milestone: | 1.9 → 1.8.16 |
---|
Here is a link to a fix:
https://github.com/jabouillei/jquery-ui/commit/5bed24df73920df74c7ed47938d49bb680948699