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 24667 - Want an quirks mode override for HTML parser
Summary: Want an quirks mode override for HTML parser
Status: RESOLVED LATER
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: Unsorted
Assignee: Morrita Hajime
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 24349
  Show dependency treegraph
 
Reported: 2014-02-14 19:41 UTC by Morrita Hajime
Modified: 2014-04-07 21:45 UTC (History)
4 users (show)

See Also:


Attachments

Description Morrita Hajime 2014-02-14 19:41:12 UTC
This comes from bug 24349.

Imports want to be non-quirks all the time as there is no legacy import HTML.
It would be great if there is a switch to force the HTML parser to do it.
Encoding detection already has such a swtich [1].
What imports want is one for quirks mode.

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#parsing-with-a-known-character-encoding
Comment 1 Ian 'Hixie' Hickson 2014-02-14 21:15:01 UTC
If we want to do this, I just need to update the parser to say that you don't ever go into quirks mode for this kind of document.

Note that this means that documents used as imports *will parse differently* when loaded directly. Is that not a problem? Do we want to use a new MIME type or something as well? If they're full documents (not fragments like srcdoc or innerHTML strings), then it'd be kind of weird for them to parse differently based on how they're loaded. It could even lead to security problems (trick the browser into loading it a different way to get it parsed differently).
Comment 2 Morrita Hajime 2014-02-14 21:28:57 UTC
(In reply to Ian 'Hixie' Hickson from comment #1)
> If we want to do this, I just need to update the parser to say that you
> don't ever go into quirks mode for this kind of document.
> 
> Note that this means that documents used as imports *will parse differently*
> when loaded directly. Is that not a problem? Do we want to use a new MIME
> type or something as well? If they're full documents (not fragments like
> srcdoc or innerHTML strings), then it'd be kind of weird for them to parse
> differently based on how they're loaded. It could even lead to security
> problems (trick the browser into loading it a different way to get it parsed
> differently).

Behaving differently won't that bad as most imports aren't intended to be
loaded as an standalone HTML. But having security risk is problem.
Thanks for pointing it out.

I'd take this on hold and search other path first.
Comment 3 Ian 'Hixie' Hickson 2014-02-21 22:13:49 UTC
Ok, I've reassigned this to you for now. Please reassign it back to me when you have further instructions for me. Thanks! :-)