Bug Tracker

Modify

Ticket #4991 (closed bug: invalid)

Opened 5 years ago

Last modified 4 years ago

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

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

Change History

Changed 5 years ago by david.cascino

patched jquery-1.3.2.js file

comment:1 Changed 5 years ago by dmethvin

  • need changed from Review to Test 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 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

No test case.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.