Skip to content

Commit ad8cae9

Browse files
committed
Added test case for #839.
1 parent cf43bd3 commit ad8cae9

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!--
2+
This test case represents HTML Tidy issue #839, which describes
3+
a descrepancy between tidy's behavior and the W3C Nu HTML
4+
checker behavior. Tidy has historically allowed empty <title>
5+
elements, but this is not allowed by HTML5, and is flagged by
6+
the Nu checker. Because a <title> is required by HTML5, it
7+
would be even worse for HTML Tidy to remove this element, and
8+
so Tidy will now provide a warning if the title element is
9+
empty. It is assumed the HTML author will add a title as well
10+
as addressing other warnings.
11+
-->
12+
<!DOCTYPE html><title></title>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--
2+
This test case represents HTML Tidy issue #839, which describes
3+
a descrepancy between tidy's behavior and the W3C Nu HTML
4+
checker behavior. Tidy has historically allowed empty <title>
5+
elements, but this is not allowed by HTML5, and is flagged by
6+
the Nu checker. Because a <title> is required by HTML5, it
7+
would be even worse for HTML Tidy to remove this element, and
8+
so Tidy will now provide a warning if the title element is
9+
empty. It is assumed the HTML author will add a title as well
10+
as addressing other warnings.
11+
-->
12+
<!DOCTYPE html>
13+
<html>
14+
<head>
15+
<title></title>
16+
</head>
17+
<body>
18+
</body>
19+
</html>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
line 12 column 16 - Warning: blank 'title' element
2+
Info: Document content looks like HTML5
3+
Tidy found 1 warning and 0 errors!
4+
5+
About HTML Tidy: https://github.com/htacg/tidy-html5
6+
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
7+
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
8+
Latest HTML specification: http://dev.w3.org/html5/spec-author-view/
9+
Validate your HTML documents: http://validator.w3.org/nu/
10+
Lobby your company to join the W3C: http://www.w3.org/Consortium
11+
12+
Do you speak a language other than English, or a different variant of
13+
English? Consider helping us to localize HTML Tidy. For details please see
14+
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md

0 commit comments

Comments
 (0)