Skip to main content

Bug Tracker

Side navigation

#7846 closed bug (invalid)

Opened December 26, 2010 03:53PM UTC

Closed December 26, 2010 04:46PM UTC

Inserting HTML content with table rows not being the first tag fails

Reported by: frederic@dejala.com Owned by:
Priority: undecided Milestone: 1.6
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
Description

Inside the clean() function, you wrap the inserted code with table and tbody tags to "protect" table rows from the browser when going to html and back. This works only if the first tag of the inserted content is indeed a "<tr" (or a td or a col).

But if there is any other tag before (like a script or CSS info in my case), then there is no such "protection", and the whole content gets messed up by the browser.

Attachments (0)
Change History (1)

Changed December 26, 2010 04:46PM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

If you are inserting anything other than TR into a THEAD, TFOOT, or TBODY, you are creating an invalid document. The auto-insert of TBODY is done to work around an IE inconsistency but is not meant to create valid documents out of invalid input.

http://www.w3.org/TR/html401/struct/tables.html#h-11.2.1