<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>24667</bug_id>
          
          <creation_ts>2014-02-14 19:41:12 +0000</creation_ts>
          <short_desc>Want an quirks mode override for HTML parser</short_desc>
          <delta_ts>2014-04-07 21:45:16 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>LATER</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          <blocked>24349</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Morrita Hajime">morrita</reporter>
          <assigned_to name="Morrita Hajime">morrita</assigned_to>
          <cc>annevk</cc>
    
    <cc>dglazkov</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>100615</commentid>
    <comment_count>0</comment_count>
    <who name="Morrita Hajime">morrita</who>
    <bug_when>2014-02-14 19:41:12 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100621</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-02-14 21:15:01 +0000</bug_when>
    <thetext>If we want to do this, I just need to update the parser to say that you don&apos;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&apos;re full documents (not fragments like srcdoc or innerHTML strings), then it&apos;d be kind of weird for them to parse differently based on how they&apos;re loaded. It could even lead to security problems (trick the browser into loading it a different way to get it parsed differently).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100627</commentid>
    <comment_count>2</comment_count>
    <who name="Morrita Hajime">morrita</who>
    <bug_when>2014-02-14 21:28:57 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #1)
&gt; If we want to do this, I just need to update the parser to say that you
&gt; don&apos;t ever go into quirks mode for this kind of document.
&gt; 
&gt; Note that this means that documents used as imports *will parse differently*
&gt; when loaded directly. Is that not a problem? Do we want to use a new MIME
&gt; type or something as well? If they&apos;re full documents (not fragments like
&gt; srcdoc or innerHTML strings), then it&apos;d be kind of weird for them to parse
&gt; differently based on how they&apos;re loaded. It could even lead to security
&gt; problems (trick the browser into loading it a different way to get it parsed
&gt; differently).

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

I&apos;d take this on hold and search other path first.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101156</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-02-21 22:13:49 +0000</bug_when>
    <thetext>Ok, I&apos;ve reassigned this to you for now. Please reassign it back to me when you have further instructions for me. Thanks! :-)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>