Skip to main content

Bug Tracker

Side navigation

#4991 closed bug (invalid)

Opened July 29, 2009 02:28PM UTC

Closed June 16, 2010 03:26AM UTC

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 July 29, 2009 02:29PM UTC.

    patched jquery-1.3.2.js file

Change History (2)

Changed August 02, 2009 08:24PM UTC by dmethvin comment:1

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.

Changed June 16, 2010 03:26AM UTC by dmethvin comment:2

resolution: → invalid
status: newclosed

No test case.