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

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 ?

--HarryMetske


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