Bug Tracker

Opened 14 years ago

Closed 13 years ago

#4991 closed bug (invalid)

attr function breaks on .css call

Reported by: david.cascino Owned by:
Priority: major Milestone: 1.3.2
Component: core Version: 1.3.2
Keywords: attr css name.replace Cc:
Blocked by: Blocking:


noticed this bug when using jquery-greybox. greybox calls .css function, css function calls attr which breaks on name.replace.

function that breaks attr: function( elem, name, value )

somehow the name parameter is converted from a string (which is what is should be) into an array function.

to patch this bug, I added some type checking before line #1056 in jquery-1.3.2.js.

if (typeof name != "string" ) {

return undefined;


there is probably a better/more efficient way to handle this. attached is my patched file. cheers.

Attachments (1)

jquery-1.3.2.js (118.0 KB) - added by david.cascino 14 years ago.
patched jquery-1.3.2.js file

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by david.cascino

Attachment: jquery-1.3.2.js added

patched jquery-1.3.2.js file

comment:1 Changed 14 years ago by dmethvin

need: ReviewTest Case

Can you provide a test case? The proposed patch just works around unexpected input, but it's not clear what is generating the input.

comment:2 Changed 13 years ago by dmethvin

Resolution: invalid
Status: newclosed

No test case.

Note: See TracTickets for help on using tickets.