This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16516 - Validator does not recognize the DOCTYPE legacy string
Summary: Validator does not recognize the DOCTYPE legacy string
Status: CLOSED FIXED
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL: http://validator.w3.org/nu/?doc=data%...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-25 19:32 UTC by Leif Halvard Silli
Modified: 2012-12-08 12:47 UTC (History)
3 users (show)

See Also:


Attachments

Description Leif Halvard Silli 2012-03-25 19:32:13 UTC
The validator does not accept the HTML5 legacy doctype:

http://www.w3.org/TR/html5/syntax.html#doctype-legacy-string

There are two variants of this doctype:

<!DOCTYPE html SYSTEM "about:legacy-compat">
<!DOCTYPE html SYSTEM 'about:legacy-compat'>

I would support putting out a warning - e.g. one could just quote what the spec says: 

]] The DOCTYPE legacy string should not be used unless the document is generated from a system that cannot output the shorter string. [[

But it does not make sense to stamp is as invalid, like the validator currently does, when the spec says that it is valid.
Comment 1 Michael[tm] Smith 2012-03-26 03:15:31 UTC
The cause of this is in the HTML parser code, so I recommend raising a bug for it against the HTML parser component at http://bugzilla.validator.nu

The current HTML parser code actually does specifically recognize "about:legacy-compat". It's just that it also specifically emits an error message for it instead of a warning, or instead of emitting nothing. I'm not sure why Henri has it doing that, but given the fact the spec says it's not an error, it seems like it should not at least not be emitting an error.

My vote would be for it to emit a specific warning saying, "The DOCTYPE legacy string should not be used unless the document is generated from a system that cannot output <!DOCTYPE html>."
Comment 2 Leif Halvard Silli 2012-03-26 03:36:45 UTC
(In reply to comment #1)
> The cause of this is in the HTML parser code, so I recommend raising a bug for
> it against the HTML parser component at http://bugzilla.validator.nu

Done: http://bugzilla.validator.nu/show_bug.cgi?id=916
Comment 3 Henri Sivonen 2012-09-21 13:09:45 UTC
https://hg.mozilla.org/projects/htmlparser/rev/98b4f408aa67

Needs Mike to redeploy at the W3C.