Skip to main content

Bug Tracker

Side navigation

#1620 closed bug (invalid)

Opened September 14, 2007 07:29PM UTC

Closed September 15, 2007 12:07AM UTC

clean: function

Reported by: sburton Owned by:
Priority: trivial Milestone: 1.2.1
Component: core Version: 1.2
Keywords: Cc: sburton@ryland.com
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.

Attachments (0)
Change History (1)

Changed September 15, 2007 12:07AM UTC by john comment:1

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!