Bug Tracker

Ticket #214 (closed bug: fixed)

Opened 2 years ago

Last modified 1 year ago

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

Reported by: alisdair.feint@… Assigned to: anonymous
Type: bug Priority: minor
Milestone: Component: core
Version: Keywords: append table whitespace
Cc: Needs:

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

Change History

Changed 2 years ago by joern

  • status changed from new to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.