#214 closed bug (fixed)
append(html) function fails, if html is a table fragment and begins with whitespace
Reported by: | 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
Trimming whitespace should help, fixed in SVN, yet untested.