Nav links

Wednesday, 7 September 2005

Firefox view source oddity

For no reason that I can discern, when viewing the following html source in Mozilla Firefox 1.0.6.



<html>

 <body>

  <table>

   <tr>

    <td colspan = "2">hello</td>

   </tr>

  </table>

 </body>

</html>




it gets confused with the space next to the colspan, and displays it as:



<html>

 <body>

  <table>

   <tr>

    <td colspan =" 2">hello</td>

   </tr>

  </table>

 </body>

</html>



which to any perfectionist programmer could be quite an annoyance. Especially if that section of the page is being dynamically generated by a PHP script, and they waste many minutes trying to track a fault in their code when it turns out to be a browser quirk...

Update 12 Sep 2005: This is fixed in Firefox 1.5 beta 1.