Bug Tracker

Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#962 closed bug (fixed)

[PATCH] A fix in clean method

Reported by: sullof@… Owned by:
Priority: major Milestone: 1.1.3
Component: core Version: 1.1.1
Keywords: Cc:
Blocked by: Blocking:

Description

jQuery 1.1.1 often doesn't preserve white space. I suggest the following variation to the clean method to preserve white space. At the line 449 instead of:

var s = jQuery.trim(arg)

I put this:

var s = /s+</.test(arg) ? jQuery.trim(arg) : arg

So, if arg is a tag string the value is trimmed but if it is pure text the value remains as is.

Attachments (1)

patch-962.txt (1.6 KB) - added by john 13 years ago.
A patch and test for appending trailing whitespace.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 13 years ago by john

Milestone: 1.1.2
Summary: A fix in clean method[PATCH] A fix in clean method
Type: enhancementbug
Version: 1.1.1

This has bit me a couple times now. I'm adding a patch which solves this.

Changed 13 years ago by john

Attachment: patch-962.txt added

A patch and test for appending trailing whitespace.

comment:2 Changed 13 years ago by john

Resolution: fixed
Status: newclosed

Committed in SVN rev [1472].

Note: See TracTickets for help on using tickets.