W3C home > Mailing lists > Public > public-html@w3.org > February 2008

Parsing: <style> and <script> in <table>

From: Simon Pieters <simonp@opera.com>
Date: Sat, 09 Feb 2008 17:57:09 +0100
To: public-html <public-html@w3.org>
Message-ID: <op.t59n1jpvidj3kv@hp-a0a83fcd39d2.belkin>

http://krijnhoetmer.nl/irc-logs/whatwg/20080209#l-331

Consider

    <table><style></style></table>

    <table><script></script></table>

Both html5lib and the Validator.nu HTML parser both put <style> and  
<script> elements in <table> instead of foster parenting them as the spec  
says they should do. Mozilla fosterparents <style>. Safari moves <style>  
to head. Opera and IE don't move <style>. All browsers don't move <script>.

<table><style scoped> might be useful for table-specific styling.  
(Especially when someone comes up with a working CSS solution for e.g.  
column alignment.)

<table><script> is probably needed for roundtripping documents that do  
<table><script>document.write(rows)</script></table>.

Therefore, I'd suggest that the spec be changed so that style and script  
are not fosterparented when found in tables.

-- 
Simon Pieters
Opera Software
Received on Saturday, 9 February 2008 16:57:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:12 GMT