#939 Outputs incorrect HTML 3.2 DOCTYPE declaration

closed-out-of-date
nobody
doctype (1)
5
2015-12-08
2011-08-17
Ian Abbott
No

When tidy recognizes the input as HTML 3.2, it produces the following DOCTYPE declaration in the output:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">

According to http://www.w3.org/TR/REC-html32 the DOCTYPE should be as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

This bug can be fixed by swapping a couple of entries in W3C_Doctypes[] in src/lexer.c so that GetFPIFromVers() finds the correct one first.

Discussion

  • Geoff

    Geoff - 2015-12-08

    Thanks for the report... now long ago... sorry for the delay...

    Tidy source has moved to https://github.com/htacg/tidy-html5

    Bugs can only be accepted against the current source, so closing this as out-of-date!

    But using the latest tidy 5.1.32++, and also checking http://www.w3.org/QA/2002/04/valid-dtd-list.html, it does seem modern tidy still has this doctype wrong.

    This is an old ongoing problem, so it seems a new issue should be filed at Issues, and your suggest fixed (by swapping a couple of entries in W3C_Doctypes[] in src/lexer.c so that GetFPIFromVers() finds the correct one first), to a github fork, then it could be presented as a Pull Request....

    Thanks, this looks a good simple fix...

     
  • Geoff

    Geoff - 2015-12-08
    • labels: --> doctype
    • status: open --> closed-out-of-date
     

Log in to post a comment.