Parsing problem with misnested tags

HTML5 (or at least html5lib and validator.nu) currently parses

   A<code><pre>B</code></pre>C

into

   |     "A"
   |     <code>
   |       <pre>
   |         "B"
   |       "C"

In particular, the "C" is inside the <code>. In browsers (IE6, FF3, 
O9.6, S3.0) the "C" is outside the <code> instead.

This significantly breaks 
http://blogs.sun.com/bblfish/entry/rest_apis_must_be_hypertext which 
currently says

   <p>... we have the following JSON representation for a Person.</p>
   <code><pre>
   {  ... }
   </code></pre>
   <p>Note that ...</p>

since it results in the last paragraph having a monospace font when it 
shouldn't.

-- 
Philip Taylor
pjt47@cam.ac.uk

Received on Tuesday, 11 November 2008 23:00:00 UTC