Skip to main content

Bug Tracker

Side navigation

#1348 closed bug (fixed)

Opened July 03, 2007 10:56AM UTC

Closed July 05, 2007 01:42AM UTC

Error with [@foo$=bar] selector

Reported by: sidebog7 Owned by:
Priority: major Milestone: 1.1.4
Component: core Version: 1.1.3
Keywords: Cc:
Blocked by: Blocking:
Description

If the selector you attempt to use scans for attributes that don't exist (e.g. $('div[@test$=end]') and there exists dividers without a test attribute) jquery throws a z has no properties error.

This appears to come from the following lines

if ((type == "" && !!z ||

type == "=" && z == m[5] ||

type == "!=" && z != m[5] ||

type == "^=" && z && !z.indexOf(m[5]) ||

type == "$=" && z.substr(z.length - m[5].length) == m[5] ||

(type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not )

tmp.push( a );

Where ^= checks z (&& z &&) whereas $= (and *= and ~=) assumes it is valid.

Attachments (0)
Change History (1)

Changed July 05, 2007 01:42AM UTC by john comment:1

resolution: → fixed
status: newclosed

Fixed in SVN.