Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#214 closed bug (fixed)

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

Reported by: alisdair.feint@… 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

Change History (1)

comment:1 Changed 13 years ago by joern

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.