Bug Tracker

Opened 14 years ago

Closed 12 years ago

Last modified 11 years ago

#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:


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:2 Changed 14 years ago by balazs.endresz

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 john

Owner: set to john

Ok, I'll check in to it.

comment:4 Changed 14 years ago by john

Resolution: fixed
Status: newclosed

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 larholm

Resolution: fixed
Status: closedreopened

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>


No elements matched.

comment:6 Changed 14 years ago by michaelmaw

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

IE error: "Object doesn't support this property or method"

comment:7 Changed 14 years ago by balazs.endresz

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 snover

Status: reopenedpending

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 trac-o-bot

Status: pendingclosed

Automatically closed due to 14 days of inactivity.

comment:10 Changed 12 years ago by jitter

Priority: majorhigh
Status: closedreopened
Version: 1.31.5rc1

The orignal fix for this seems to be a no-op.

test case

comment:11 Changed 12 years ago by jitter

Owner: changed from john to jitter
Status: reopenedassigned

comment:12 Changed 12 years ago by Anton M

Resolution: fixed
Status: assignedclosed

Pull over tests from Sizzle. Fixes #3729. Fixes #6428.

Changeset: 1e4f3c07c70861fc334a0e61080f8bbde0d7d442

Note: See TracTickets for help on using tickets.