Wicket
  1. Wicket
  2. WICKET-5237

Wicket generates invalid HTML by expanding col tags

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.8.0
    • Fix Version/s: 6.9.0, 7.0.0-M1
    • Component/s: None
    • Labels:
    • Environment:

      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

        Activity

        Konrad Mohrfeldt created issue -
        Konrad Mohrfeldt made changes -
        Field Original Value New Value
        Description 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
        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
        Martin Grigorov made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Martin Grigorov [ mgrigorov ]
        Fix Version/s 6.9.0 [ 12324357 ]
        Fix Version/s 7.0.0 [ 12322958 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Konrad Mohrfeldt
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development