Title | Table Header Not XHTML Compliant |
Date | 17-Apr-2006 07:37:23 EEST |
Version | v2.3.99 |
Submitter | Dirk Frederickx |
Bug criticality | LightBug |
Browser version | safari |
Bug status | ClosedBug |
PageProvider used | |
Servlet Container | tomcat |
Operating System | |
URL | |
Java version | v1.4.2 |
Table render bug #
Following table tags are not closed properly. (updated) It seems to happen when changing from header to normal cells within one row.
Testtable || header | cell | cell || header
renders as :
Testtable
header | cell |
---|
cell | header |
---|
or in html:
<p /> <p>Testtable </p> <table class="wikitable" border="1"><tr class="odd"><th> header <td> cell</td></th></tr> </table><p /> <table class="wikitable" border="1"><tr class="odd"><td> cell <th> header</th></td></tr> </table><p />
--DF
After some more investigation, the err is probably in JSPWikiMarkupParser.java at line 2191
if( ch == '|' ) { if( !newLine ) { el = popElement("th"); } el = pushElement( new Element("th") ); } else { if( !newLine ) { el = popElement("td"); } el = pushElement( new Element("td") ); pushBack( ch ); }You can see that the popElement doesn't look at the current element, being a TH or TD, but at the next element. The effect is that the next pushElement becomes a subelement of the previous; so the next TDs become children of the first TH.
-DF
This is still the case, can the suggested correction be implemented ?
Fixed in 2.5.30.
Add new attachment
Only authorized users are allowed to upload new attachments.