Ticket #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@… | |
| Blocking: | Blocked by: |
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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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!