<table><select><td> parsing

Consider the document:

<!DOCTYPE html>
<table><td>x</td> <select><option>a<option>b <td>y</td>

In IE6, Firefox 2, Safari 3 and Opera 9.2, this is rendered as a select 
box with options "a" and "b" followed by a table containing cells "x" 
and "y".

HTML5 currently parses this as:

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <select>
|       <option>
|         "a"
|       <option>
|         "b y"
|     <table>
|       <tbody>
|         <tr>
|           <td>
|             "x"
|           " "

(<http://parsetree.validator.nu/?doc=http://philip.html5.org/misc/fostered-select.html>) 
and does not handle the second cell in a compatible way.

(This happens because the <select> changes the insertion mode from "in 
table" to "in select", and <td> is ignored in that mode.)

-- 
Philip Taylor
pjt47@cam.ac.uk

Received on Sunday, 10 February 2008 00:31:11 UTC