Ticket #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: | |
| Blocking: | Blocked by: |
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.
Attachments
Change History
Changed 4 years ago by david.cascino
-
attachment
jquery-1.3.2.js
added
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

patched jquery-1.3.2.js file