1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> 2 3<!-- 4 bug-2000-12-27-a.html 5 6Problem: 7 Running Tidy on this file produces the diagnostic: 8 9 Doctype given is "-//W3C//DTD HTML 3.2//EN" 10 11 ...when clearly the DOCTYPE is not as shown. Problem appears to be that 12 doctype is "fixed" in FixDocType before it is reported in ReportVersion. 13 See "tidy.c" lines 1001, 1016. 14 15Expected behavior: 16 17 The DOCTYPE that appears in the file should be reported in the "Doctype 18 given" diagnostic. 19 20Verification: 21 tidy -e bug-2000-12-27-a.html 22 23Correction: 24 tidy.c (main) 25--> 26 27<html> 28 29<head> 30<title>Bug-2000-12-27-A [ #431883 ] Given doctype reported incorrectly</title> 31</head> 32 33<body> 34 35 36<!-- 37 If you use a plain table tag, tidy complains about 38 no summary attribute and demotes the version to 3.2 39--> 40<table> 41 42<!-- 43 If you add a summary attribute to the table tag, 44 tidy identifies the doc as 4.01 transitional. 45 46<table summary="Tidy reports this as 3.2, not 4.0"> 47--> 48 49<tr> 50<td>A cell.</td> 51</tr> 52</table> 53 54</body> 55</html> 56