#594 can't process <div> inside <button>

closed-fixed
nobody
6
2005-11-26
2004-08-04
Anonymous
No

Can't process:
<button class="button" type="button">
<div lang="all">
<div lang="en" >Lost Password</div>
<div lang="sp">Lost Password (sp*)</div>
</div><!-- lang="all" -->
</button>

Gives message:
Warning: missing </button> before <div>

Version:
HTML Tidy for Windows released on 1st July 2004

email:
gary@microadvice.com

Discussion

  • Arnaud Desitter

    Arnaud Desitter - 2004-08-09

    Logged In: YES
    user_id=566665

    It is a bug. BUTTON is a block level element according the HTML
    4.01 DTD.

     
  • Arnaud Desitter

    Arnaud Desitter - 2004-08-09

    Logged In: YES
    user_id=566665

    Here is a patch:

    Index: tags.c

    RCS file: /cvsroot/tidy/tidy/src/tags.c,v
    retrieving revision 1.51
    diff -u -p -r1.51 tags.c
    --- tags.c 2 Aug 2004 02:31:32 -0000 1.51
    +++ tags.c 9 Aug 2004 12:42:21 -0000
    @@ -139,7 +139,7 @@ static const Dict tag_defs[] =
    { TidyTag_BLOCKQUOTE, "blockquote", VERS_ELEM_BLOCKQUOTE,
    &W3CAttrsFor_BLOCKQUOTE[0], (CM_BLOCK),
    ParseBlock, NULL },
    { TidyTag_BODY, "body", VERS_ELEM_BODY,
    &W3CAttrsFor_BODY[0], (CM_HTML|CM_OPT|CM_OMITST),
    ParseBody, NULL },
    { TidyTag_BR, "br", VERS_ELEM_BR,
    &W3CAttrsFor_BR[0], (CM_INLINE|CM_EMPTY),
    ParseEmpty, NULL },
    - { TidyTag_BUTTON, "button", VERS_ELEM_BUTTON,
    &W3CAttrsFor_BUTTON[0], (CM_INLINE),
    ParseInline, NULL },
    + { TidyTag_BUTTON, "button", VERS_ELEM_BUTTON,
    &W3CAttrsFor_BUTTON[0], (CM_BLOCK),
    ParseBlock, NULL },
    { TidyTag_CAPTION, "caption", VERS_ELEM_CAPTION,
    &W3CAttrsFor_CAPTION[0], (CM_TABLE),
    ParseInline, CheckCaption },
    { TidyTag_CENTER, "center", VERS_ELEM_CENTER,
    &W3CAttrsFor_CENTER[0], (CM_BLOCK),
    ParseBlock, NULL },
    { TidyTag_CITE, "cite", VERS_ELEM_CITE,
    &W3CAttrsFor_CITE[0], (CM_INLINE),
    ParseInline, NULL },

     
  • Arnaud Desitter

    Arnaud Desitter - 2004-08-09

    Logged In: YES
    user_id=566665

    Here is a test case (in_1003361.html):

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>char attribute in table</title>
    </head>
    <body>
    <button type="button">
    <div lang="all">
    <div lang="en" >Lost Password</div>
    <div lang="sp">Lost Password (sp*)</div>
    </div><!-- lang="all" -->
    </button>
    </body>
    </html>

     
  • Anonymous - 2004-08-10
    • milestone: 280587 --> Current - all platforms
     
  • Anonymous - 2004-08-10

    Logged In: YES
    user_id=225318

    I'm not the expert here, but it seems BUTTON is both a block level and
    inline element, so perhaps :

    + { TidyTag_BUTTON, "button", VERS_ELEM_BUTTON,
    &W3CAttrsFor_BUTTON[0], (CM_BLOCK|CM_INLINE|CM_MIXED),
    ParseBlock, NULL },

    Expert opinion? Perhaps documentation on the content models used by
    Tidy would be helpful.

     
  • Arnaud Desitter

    Arnaud Desitter - 2005-02-17
    • priority: 5 --> 6
     
  • Nobody/Anonymous

    Logged In: NO

    use <F5> as a finder key

     
  • Arnaud Desitter

    Arnaud Desitter - 2005-10-26

    Logged In: YES
    user_id=566665

    The issue described is fixed in CVS.

     
  • Arnaud Desitter

    Arnaud Desitter - 2005-10-26
    • status: open --> pending-fixed
     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks