Bug Tracker

Opened 12 years ago

Closed 12 years ago

#1620 closed bug (invalid)

clean: function

Reported by: sburton Owned by:
Priority: trivial Milestone: 1.2.1
Component: core Version: 1.2
Keywords: Cc: sburton@…
Blocked by: Blocking:

Description

I am new to jQuery, but came across an issue in the clear: function.

Where jQuery trim whitespace it trims and lower-cases the entire arg where it looks like it only needs to lower-case the html tags. We just removed the jQuery.trim(arg).toLowerCase(),... to jQuery.trim(arg),... but I think it is safer to lower-case the tags. Maybe just lower case within side the tags.

var s = jQuery.trim(arg).replace(/<.*?>/g, "$0"), div = doc.createElement("div"), tb = [];

instead of

var s = jQuery.trim(arg).toLowerCase(), div = doc.createElement("div"), tb = [];

or something of that affect without removing the .toLowerCase() function.

Change History (1)

comment:1 Changed 12 years ago by john

Resolution: invalid
Status: newclosed

I think there's some confusion - that string "s" - is ONLY used for comparison. You'll not that we leave the original 'arg' variable intact and insert that directly into the document. Thanks for your thoughts, though - and welcome to jQuery!

Note: See TracTickets for help on using tickets.