Bug Tracker

Ticket #1348 (closed bug: fixed)

Opened 1 year ago

Last modified 1 year ago

Error with [@foo$=bar] selector

Reported by: sidebog7 Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.1.4 Component: core
Version: 1.1.3 Keywords:
Cc: Needs: Review

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

Change History

Changed 1 year ago by john

  • status changed from new to closed
  • resolution set to fixed

Fixed in SVN.

Note: See TracTickets for help on using tickets.