Bug Tracker

Opened 13 years ago

Closed 13 years ago

#7846 closed bug (invalid)

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

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

Change History (1)

comment:1 Changed 13 years ago by dmethvin

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

Note: See TracTickets for help on using tickets.