#3729 closed bug (fixed)
Attribute selector with an class seperator(':') in it, fails.
Reported by: | Dykam | Owned by: | jitter |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | selector | Version: | 1.5rc1 |
Keywords: | attribute selector class | Cc: | |
Blocked by: | Blocking: |
Description
This code fails: $('[xml:lang="nl"]'); While this works: $('[id="someID"]');
I needed this because when validating the html attribute lang="", the validator tells me I need xml:lang="".
Change History (12)
comment:1 Changed 14 years ago by
need: | Review → Test Case |
---|
comment:2 Changed 14 years ago by
In 1.3.0 when escaping the colon the backslash isn't removed from match[1]
. Looks like the same as #3803.
comment:3 Changed 14 years ago by
Milestone: | 1.3 → 1.3.1 |
---|---|
Owner: | set to john |
Version: | 1.2.6 → 1.3 |
Ok, I'll check in to it.
comment:4 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Ok, should be fixed now. http://github.com/jeresig/sizzle/commit/380f65bfa72febab01effc0414b0c052f63a2a25
Will be merging into jQuery shortly.
comment:5 Changed 14 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
jQuery 1.3.1 - I am still unable to use a selector for attributes with : in their name, such as in namespaced attributes.
Here is a simple testcase:
<a href="somewhere.html" test:ajax="json">test</a>
$('a[test
:ajax]')
No elements matched.
comment:6 Changed 14 years ago by
I am using jQuery 1.3.2 and this works fine in Firefox, but fails in IE (tested using IE 7).
Example: <div my:tooltip="Show this"></div>
jQuery: $('div[my
:tooltip]')
IE error: "Object doesn't support this property or method"
comment:7 Changed 14 years ago by
I've had a quick look at it and it seems like the ATTR prefilter removes the backslash but it appears again in filter.ATTR! Moreover, if you call $('div[my\\:tooltip]')
instead of $('div[my\\:tooltip="Show this"]')
then filter.ATTR
isn't even called, is that OK?
comment:8 Changed 12 years ago by
Status: | reopened → pending |
---|
This ticket has been marked as missing a test case. In an effort to reduce the number of outstanding tickets in the bug tracker, it will be closed automatically in 30 days. In order to prevent this from happening, please provide a working test case. If a test case has already been provided and our records are wrong, please respond to the ticket so that it can be fixed. Thank you!
comment:9 Changed 12 years ago by
Status: | pending → closed |
---|
Automatically closed due to 14 days of inactivity.
comment:10 Changed 12 years ago by
Milestone: | 1.3.1 → 1.5 |
---|---|
Priority: | major → high |
Status: | closed → reopened |
Version: | 1.3 → 1.5rc1 |
The orignal fix for this seems to be a no-op.
comment:11 Changed 12 years ago by
Owner: | changed from john to jitter |
---|---|
Status: | reopened → assigned |
comment:12 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Pull over tests from Sizzle. Fixes #3729. Fixes #6428.
Changeset: 1e4f3c07c70861fc334a0e61080f8bbde0d7d442
Did you try escaping the colon?
http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F