Skip to main content

Bug Tracker

Side navigation

#214 closed bug (fixed)

Opened September 26, 2006 03:15AM UTC

Closed October 06, 2006 03:05PM UTC

Last modified June 21, 2007 02:27AM UTC

append(html) function fails, if html is a table fragment and begins with whitespace

Reported by: alisdair.feint@energ Owned by:
Priority: minor Milestone:
Component: core Version:
Keywords: append table whitespace Cc:
Blocked by: Blocking:
Description

This happens when using the append(html) function with a table fragment (e.g. <tr>...) and there is whitespace at the beginning of the html string.

It causes unpredictable results as an invalid html block is assigned to a div tag - in windows firefox 1.5.0.7 it strips out all the tr and td tags

When the function clean() is called (from within jquery) it attempts to detect that the string starts with a table element, and handle this case specially.

This is correct, however, if the string has white space before the first actual tag, the string is not detected as being a table fragment by the function, and so is handled incorrectly.

This causes unpredictable results as incorrect html is assigned to a div tag - in windows firefox 1.5.0.7 it strips out all the tr and td tags

Attachments (0)
Change History (1)

Changed October 06, 2006 03:05PM UTC by joern comment:1

resolution: → fixed
status: newclosed

Trimming whitespace should help, fixed in SVN, yet untested.