Skip to content

Commit 2db740c

Browse files
sideshowbarkerhsivonen
authored andcommitted
Report error always for Transitional doctype
Fixes validator/validator#408 Thanks @still-dreaming-1
1 parent d18cec8 commit 2db740c

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/nu/validator/htmlparser/impl/TreeBuilder.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -896,13 +896,7 @@ public final void doctype(@Local String name, String publicIdentifier,
896896
warn("Comments seen before doctype. Internet Explorer will go into the quirks mode.",
897897
firstCommentLocation);
898898
}
899-
if ("-//W3C//DTD HTML 4.01 Transitional//EN".equals(publicIdentifier)) {
900-
if (!"http://www.w3.org/TR/html4/loose.dtd".equals(systemIdentifier)) {
901-
warn("The doctype did not contain the system identifier prescribed by the HTML 4.01 specification. Expected \u201C<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\u201D.");
902-
}
903-
} else {
904-
err("Almost standards mode doctype. Expected e.g. \u201C<!DOCTYPE html>\u201D.");
905-
}
899+
errAlmostStandardsDoctype();
906900
documentModeInternal(
907901
DocumentMode.ALMOST_STANDARDS_MODE,
908902
publicIdentifier, systemIdentifier, html4);

0 commit comments

Comments
 (0)