You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Konrad Mohrfeldt (JIRA)" <ji...@apache.org> on 2013/06/17 12:28:19 UTC

[jira] [Updated] (WICKET-5237) Wicket generates invalid HTML by expanding col tags

     [ https://issues.apache.org/jira/browse/WICKET-5237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konrad Mohrfeldt updated WICKET-5237:
-------------------------------------

    Description: 
hi,

I just noticed that wicket expands col tags, even though the (x)html specifications forbids it.

take this markup as an example:

<table>
    <colgroup>
        <col width="20%" />
        <col width="80%" />
    </colgroup>
    <tbody>
        <tr>
            <td>I take a fifth of the available space</td>
            <td>I take four fifth of the available space</td>
        </tr>
    </tbody>
</table>

Instead of return this as-is, it get's converted to:

<table>
    <colgroup>
        <col width="20%"></col>
        <col width="80%"></col>
    </colgroup>
    <tbody>
        <tr>
            <td>I take a fifth of the available space</td>
            <td>I take four fifth of the available space</td>
        </tr>
    </tbody>
</table>

But the specifications mention that col tags must not have end tags. This may be related to WICKET-2765, as this seems to be the point when col was added to the OpenCloseTagExpander class. Note that it is ok to have a non closing col tag in html (self-closing in xhtml). It's all about generating a separated end tag.

This happens in wicket 6.8, but I guess it's relevant to all versions down to wicket 1.4.

Specs for reference:

http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#edef-COL
http://www.w3.org/TR/html-markup/col.html

Kind regards,

Konrad

  was:
hi,

I just noticed that wicket expands col tags, even though the (x)html specifications forbids it.

take this markup as an example:

{code:xml}
<table>
    <colgroup>
        <col width="20%" />
        <col width="80%" />
    </colgroup>
    <tbody>
        <tr>
            <td>I take a fifth of the available space</td>
            <td>I take four fifth of the available space</td>
        </tr>
    </tbody>
</table>
{code}

Instead of return this as-is, it get's converted to:

{code:xml}
<table>
    <colgroup>
        <col width="20%"></col>
        <col width="80%"></col>
    </colgroup>
    <tbody>
        <tr>
            <td>I take a fifth of the available space</td>
            <td>I take four fifth of the available space</td>
        </tr>
    </tbody>
</table>
{code}

But the specifications mention that col tags must not have end tags. This may be related to WICKET-2765, as this seems to be the point when col was added to the OpenCloseTagExpander class. Note that it is ok to have a non closing col tag in html (self-closing in xhtml). It's all about generating a separated end tag.

This happens in wicket 6.8, but I guess it's relevant to all versions down to wicket 1.4.

Specs for reference:

http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#edef-COL
http://www.w3.org/TR/html-markup/col.html

Kind regards,

Konrad

    
> Wicket generates invalid HTML by expanding col tags
> ---------------------------------------------------
>
>                 Key: WICKET-5237
>                 URL: https://issues.apache.org/jira/browse/WICKET-5237
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.8.0
>         Environment: Ubuntu 12.10, 3.5.0-32-generic #53-Ubuntu SMP Wed May 29 20:23:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
> java version "1.7.0_21"
> Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
>            Reporter: Konrad Mohrfeldt
>            Priority: Minor
>              Labels: html
>
> hi,
> I just noticed that wicket expands col tags, even though the (x)html specifications forbids it.
> take this markup as an example:
> <table>
>     <colgroup>
>         <col width="20%" />
>         <col width="80%" />
>     </colgroup>
>     <tbody>
>         <tr>
>             <td>I take a fifth of the available space</td>
>             <td>I take four fifth of the available space</td>
>         </tr>
>     </tbody>
> </table>
> Instead of return this as-is, it get's converted to:
> <table>
>     <colgroup>
>         <col width="20%"></col>
>         <col width="80%"></col>
>     </colgroup>
>     <tbody>
>         <tr>
>             <td>I take a fifth of the available space</td>
>             <td>I take four fifth of the available space</td>
>         </tr>
>     </tbody>
> </table>
> But the specifications mention that col tags must not have end tags. This may be related to WICKET-2765, as this seems to be the point when col was added to the OpenCloseTagExpander class. Note that it is ok to have a non closing col tag in html (self-closing in xhtml). It's all about generating a separated end tag.
> This happens in wicket 6.8, but I guess it's relevant to all versions down to wicket 1.4.
> Specs for reference:
> http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#edef-COL
> http://www.w3.org/TR/html-markup/col.html
> Kind regards,
> Konrad

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira