validator Tidy HTML adds DTD without systemId to quirks documents.

Hi,

consider this simple html document.
<html>
<head><title>test</title>
</head>
<body>
<p>Hello world</p>
</body>
which the w3c validator ‘Tidy html’ corrects to
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> 
<html>
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<title>test</title> 
</head>
<body>
<p>Hello world</p>
</body> 
</html>

which has an added DTD that has no systemId part... in the latest browser versions this is correctly rendered as document.compatMode==’BackCompat’ although each browser vendor has different interpretations as to what this means...and IE10 beta now has a “IE10 Quirks mode”

however in previous versions of FX, chrome and safari this (a dtd without a systemId) would be rendered as document.compatMode==’CSS1Compat’

In the wild I see quite a few (high volume) websites that have a DTD without a systemId eg. http://au.yahoo.com/ uses
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >

but my main concern is for the novice or hobbyist website developer who validates their markup using the validator.w3.org service. (I see that validator.nu has no ‘tidy html’ options) and mistakenly copies the tidied  html verbatim to their source...

have you considered updating the Tidy HTML option output to include the systemId part in the added Document Type declaration?

re: http://www.w3.org/QA/2002/04/valid-dtd-list.html

has no mention of valid DTD’s without the systemId part.

No response is required...

Regards. 

Received on Sunday, 29 July 2012 07:07:14 UTC