[xml] extra endtag problem



Hi,

While making a testcase of http://www.collab.net/ to see why it didn't layout
correctly in gtkhtml2 I found this code:

<table border="4">
 <tr>
  <td>Cell 1 in table 1</td>
  <td>
   <table border="4">
    <tr>
     <td>Cell 1 in table 2 which is in cell 2 och table 1</td></td> <!-- One tag to much -->
    </tr>
   </table>
  </td>
  <td>cell 3 in table 1</td>
 </tr>
</table>

As you can see there is an extra "</td>" tag on line 9. You might think
gnome-xml just ignore it and continue. No gnome-xml tries to fix it but the
result isn't even close to the original:

<table border="4">
 <tr>
  <td>Cell 1 in table 1</td>
  <td>
   <table border="4">
    <tr>
     <td>Cell 1 in table 2 which is in cell 2 och table 1</td>
    </tr>
   </table>
  </td>
 </tr>
</table>
<td>cell 3 in table 1</td>

This is how it was indended to look:

-------------------------------------------------------------------------------------
|Cell 1 in table 1|Cell 1 in table 2 which is in cell 2 och table 1|cell 3in table 1|
-------------------------------------------------------------------------------------

But after gnome-xml tried to fix it it becomes:

--------------------------------------------------------------------
|Cell 1 in table 1|Cell 1 in table 2 which is in cell 2 och table 1|
--------------------------------------------------------------------
cell 3 in table 1

I know this isn't valid html but there is alot of broken html pages on
the internet and both mozilla, netscape, opera and konqueror resolves
the error by just removing the extra "</td>" tag.

I'm using the latest CVS version of gnome-xml

Just some thoughts...

/ Jonas
-- 
Jonas Borgström                  jonas codefactory se
CodeFactory AB                   http://www.codefactory.se/
Office: +46 (0)90 71 86 10       Cell: +46 (0)70 248 89 58




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]