Fixes #836. Version bump to reflect change. Test cases added.

This commit is contained in:
Jim Derry 2021-07-09 15:51:14 -04:00
parent 8d3019da22
commit 009da61f8b
6 changed files with 68 additions and 2 deletions

View File

@ -0,0 +1,3 @@
# Sample config for 938.
indent: yes
wrap: 999

View File

@ -0,0 +1,22 @@
<!--
This test case represents HTML Tidy issue #839, which describes
a descrepancy between tidy's behavior and the W3C Nu HTML
checker behavior. Tidy has historically allowed empty <title>
elements, but this is not allowed by HTML5, and is flagged by
the Nu checker. Because a <title> is required by HTML5, it
would be even worse for HTML Tidy to remove this element, and
so Tidy will now provide a warning if the title element is
empty. It is assumed the HTML author will add a title as well
as addressing other warnings.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Issue #836</title>
<template>hi</template>
</head>
<body>
<p>Issue #836</p>
</body>
</html>

View File

@ -0,0 +1,28 @@
<!--
This test case represents HTML Tidy issue #839, which describes
a descrepancy between tidy's behavior and the W3C Nu HTML
checker behavior. Tidy has historically allowed empty <title>
elements, but this is not allowed by HTML5, and is flagged by
the Nu checker. Because a <title> is required by HTML5, it
would be even worse for HTML Tidy to remove this element, and
so Tidy will now provide a warning if the title element is
empty. It is assumed the HTML author will add a title as well
as addressing other warnings.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>
Issue #836
</title>
<template>
hi
</template>
</head>
<body>
<p>
Issue #836
</p>
</body>
</html>

View File

@ -0,0 +1,13 @@
Info: Document content looks like HTML5
No warnings or errors were found.
About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
Latest HTML specification: http://dev.w3.org/html5/spec-author-view/
Validate your HTML documents: http://validator.w3.org/nu/
Lobby your company to join the W3C: http://www.w3.org/Consortium
Do you speak a language other than English, or a different variant of
English? Consider helping us to localize HTML Tidy. For details please see
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md

View File

@ -325,7 +325,7 @@ static Dict tag_defs[] =
{ TidyTag_SLOT, "slot", VERS_ELEM_SLOT, &TY_(W3CAttrsFor_SLOT)[0], (CM_BLOCK|CM_INLINE|CM_MIXED), TY_(ParseBlock), NULL },
{ TidyTag_SOURCE, "source", VERS_ELEM_SOURCE, &TY_(W3CAttrsFor_SOURCE)[0], (CM_BLOCK|CM_INLINE|CM_EMPTY), TY_(ParseBlock), NULL },
{ TidyTag_SUMMARY, "summary", VERS_ELEM_SUMMARY, &TY_(W3CAttrsFor_SUMMARY)[0], (CM_BLOCK), TY_(ParseBlock), NULL }, /* Is. #895 */
{ TidyTag_TEMPLATE, "template", VERS_ELEM_TEMPLATE, &TY_(W3CAttrsFor_TEMPLATE)[0], (CM_BLOCK), TY_(ParseBlock), NULL },
{ TidyTag_TEMPLATE, "template", VERS_ELEM_TEMPLATE, &TY_(W3CAttrsFor_TEMPLATE)[0], (CM_BLOCK|CM_HEAD), TY_(ParseBlock), NULL },
{ TidyTag_TIME, "time", VERS_ELEM_TIME, &TY_(W3CAttrsFor_TIME)[0], (CM_INLINE), TY_(ParseInline), NULL },
{ TidyTag_TRACK, "track", VERS_ELEM_TRACK, &TY_(W3CAttrsFor_TRACK)[0], (CM_BLOCK|CM_EMPTY), TY_(ParseBlock), NULL },
{ TidyTag_VIDEO, "video", VERS_ELEM_VIDEO, &TY_(W3CAttrsFor_VIDEO)[0], (CM_BLOCK|CM_INLINE), TY_(ParseBlock), NULL },

View File

@ -1,2 +1,2 @@
5.7.57
5.7.58
2021.07.09