Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#194 closed bug (fixed)

Fix for attribute *=, ^=, and $= in cases where special attributes.

Reported by: bjmiller@… Owned by:
Priority: major Milestone: 1.0
Component: core Version: 1.0
Keywords: attribute Cc:
Blocked by: Blocking:


In FF 1.5, selecting attribute @name where the name attribute is not present results in a "z has no properties" error, because z, which should be "" when the attribute is not present, has a value of null.

Change History (3)

comment:1 Changed 14 years ago by anonymous

This has solved the problem:

Change jQuery.expr."@" from

"@": {
	"=": "z==m[4]",
	"!=": "z!=m[4]",
	"^=": "!z.indexOf(m[4])",
	"$=": "z.substr(z.length - m[4].length,m[4].length)==m[4]",
	"*=": "z.indexOf(m[4])>=0",
	"": "z"


"@": {
	"=": "z==m[4]",
	"!=": "z!=m[4]",
	"^=": "z && !z.indexOf(m[4])",
	"$=": "z && z.substr(z.length - m[4].length,m[4].length)==m[4]",
	"*=": "z && z.indexOf(m[4])>=0",
	"": "z"

We're just testing for null before we try to call the indexOf() or substr() methods that we expect from strings.

comment:2 Changed 14 years ago by bjmiller@…

Milestone: 1.0
Version: 1.0

comment:3 Changed 14 years ago by joern

Resolution: fixed
Status: newclosed

Fixed in SVN.

Note: See TracTickets for help on using tickets.