Skip to main content

Bug Tracker

Side navigation

#3729 closed bug (fixed)

Opened December 20, 2008 01:25PM UTC

Closed January 28, 2011 12:52AM UTC

Last modified March 09, 2012 08:40AM UTC

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:


While this works:


I needed this because when validating the html attribute lang="", the validator tells me I need xml:lang="".

Attachments (0)
Change History (12)

Changed December 21, 2008 03:05PM UTC by dmethvin comment:1

Changed January 14, 2009 08:28PM UTC by balazs.endresz comment:2

In 1.3.0 when escaping the colon the backslash isn't removed from match[1]. Looks like the same as #3803.

Changed January 15, 2009 08:21PM UTC by john comment:3

owner: → john

Ok, I'll check in to it.

Changed January 17, 2009 09:50PM UTC by john comment:4

resolution: → fixed
status: newclosed

Ok, should be fixed now.

Will be merging into jQuery shortly.

Changed February 13, 2009 12:11PM UTC by larholm comment:5

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.

Changed July 08, 2009 09:34PM UTC by michaelmaw comment:6

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"

Changed July 09, 2009 09:37AM UTC by balazs.endresz comment:7

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?

Changed October 14, 2010 03:14AM UTC by snover comment:8

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!

Changed November 11, 2010 11:09PM UTC by trac-o-bot comment:9

status: pendingclosed

Automatically closed due to 14 days of inactivity.

Changed January 28, 2011 12:30AM UTC by jitter comment:10

priority: majorhigh
status: closedreopened
version: 1.31.5rc1

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

test case

Changed January 28, 2011 12:30AM UTC by jitter comment:11

owner: johnjitter
status: reopenedassigned

Changed January 28, 2011 12:52AM UTC by Anton M comment:12

resolution: → fixed
status: assignedclosed

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

Changeset: 1e4f3c07c70861fc334a0e61080f8bbde0d7d442