TitleTable Header Not XHTML Compliant
Date17-Apr-2006 07:37:23 EEST
SubmitterDirk Frederickx
Bug criticalityLightBug
Browser versionsafari
Bug statusClosedBug
PageProvider used
Servlet Containertomcat
Operating System
Java versionv1.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.

|| header | cell

| cell    || header

renders as :


header cell

cell header

or in html:

<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 />


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") );
            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.


This is still the case, can the suggested correction be implemented ?


Fixed in 2.5.30.

-- JanneJalkanen

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-6) was last changed on 18-Mar-2007 17:03 by JanneJalkanen