A last vestige of the layout table

So, I’m working on a site transforming it to table-less layout unless they are semantically appropirate (very ironically, one of the only data placements on the site where tables where semantically appropriate the original authors used an unordered list for a three column table, and resorted to complicated nonbreaking spaces to try to align the columns. Jeez…)

Anyway, I bumped into a problem where some of the admin content areas allowed unclosed tags (usually unclosed <b> and <u>, but some <a> as well). I could install tidy into the site, but cleaning html on every page load is inefficient, a better solution will be to rewrite their authoring tools to do the cleanup at submit time, then write a traversal tool to clean up their existing mess.

That will take time outside my current deadline, so I went back to using tables just to wrap the garbage. See, tables don’t render like other tags (which is why they aren’t normally to be used for layout). One of their effects is that when you close a table, the browser closes any child tags.

It’s ugly. I don’t like it. But I did find this useful to do and figured passing it along might be of help.