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: |
Description
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.
Can you provide a test case? The proposed patch just works around unexpected input, but it's not clear what is generating the input.