HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
597910805apply wg decision2011-04-08 22:12
@@ -6410,23 +6410,27 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
   specification. Both sets of rules return a <span>MIME type</span> as
   their result. <a href="#refsMIMESNIFF">[MIMESNIFF]</a></p>
 
   <p class="warning">It is imperative that the rules in the
   Media Type Sniffing specification be followed
   exactly. When a user agent uses different heuristics for content
   type detection than the server expects, security problems can
   occur. For more details, see the Media Type Sniffing
   specification. <a href="#refsMIMESNIFF">[MIMESNIFF]</a></p>
 
+
+  <h4>Extracting encodings from <code>meta</code> elements</h4>
+
   <p>The <dfn>algorithm for extracting an encoding from a
-  Content-Type</dfn>, given a string <var title="">s</var>, is as
-  follows. It either returns an encoding or nothing.</p>
+  <code>meta</code> element</dfn>, given a string <var
+  title="">s</var>, is as follows. It either returns an encoding or
+  nothing.</p>
 
   <ol> <!-- http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html -->
 
    <li><p>Let <var title="">position</var> be a pointer into <var
    title="">s</var>, initially pointing at the start of the
    string.</p></li>
 
    <li><p><i>Loop</i>: Find the first seven characters in <var
    title="">s</var> after <var title="">position</var> that are an
    <span>ASCII case-insensitive</span> match for the word "<code
@@ -6466,27 +6470,28 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
      character to the first U+0009, U+000A, U+000C, U+000D, U+0020, or
      U+003B character or the end of <var title="">s</var>, whichever
      comes first.</dd>
 
     </dl>
 
    </li>
 
   </ol>
 
-  <p class="note">This requirement is a <span>willful violation</span>
-  of the HTTP specification (for example, HTTP doesn't allow the use
-  of single quotes and requires supporting a backslash-escape
-  mechanism that is not supported by this algorithm<!-- not to mention
-  not having any rules for error-handling, which is of course why
-  we're having to define it ourselves -->), motivated by the need for
-  backwards compatibility with legacy content. <a
+  <p class="note">This algorithm is distinct from those in the HTTP
+  specification (for example, HTTP doesn't allow the use of single
+  quotes and requires supporting a backslash-escape mechanism that is
+  not supported by this algorithm<!-- not to mention not having any
+  rules for error-handling, which is of course why we're having to
+  define it ourselves -->). While the algorithm is used in contexts
+  that, historically, were related to HTTP, the syntax as supported by
+  implementations diverged some time ago. <a
   href="#refsHTTP">[HTTP]</a></p>
 
   </div>
 
 
 
   <h3>Common DOM interfaces</h3>
 
   <h4>Reflecting content attributes in IDL attributes</h4>
 
@@ -90458,25 +90463,26 @@ interface <span>WindowLocalStorage</span> {
            title="">http-equiv</code>"</dt>
 
            <dd><p>If the attribute's value is "<code
            title="">content-type</code>", then set <var title="">got
            pragma</var> to true.</p></dd>
 
            <dt>If the attribute's name is "<code
            title="">content</code>"</dt>
 
            <dd><p>Apply the <span>algorithm for extracting an encoding
-           from a Content-Type</span>, giving the attribute's value as
-           the string to parse. If an encoding is returned, and if
-           <var title="">charset</var> is still set to null, let <var
-           title="">charset</var> be the encoding returned, and set
-           <var title="">need pragma</var> to true.</p></dd>
+           from a <code>meta</code> element</span>, giving the
+           attribute's value as the string to parse. If an encoding is
+           returned, and if <var title="">charset</var> is still set
+           to null, let <var title="">charset</var> be the encoding
+           returned, and set <var title="">need pragma</var> to
+           true.</p></dd>
 
            <dt>If the attribute's name is "<code
            title="">charset</code>"</dt>
 
            <dd><p>Let <var title="">charset</var> be the encoding
            corresponding to the attribute's value, and set <var
            title="">need pragma</var> to false.</p></dd>
 
           </dl>
 
@@ -95088,23 +95094,23 @@ document.body.appendChild(text);
     <i>tentative</i>, then <span>change the encoding</span> to the
     encoding given by the value of the <code
     title="attr-meta-charset">charset</code> attribute.</p>
 
     <p>Otherwise, if the element has an <code
     title="attr-meta-http-equiv">http-equiv</code> attribute whose
     value is an <span>ASCII case-insensitive</span> match for the
     string "<code title="">Content-Type</code>", and the element has a
     <code title="attr-meta-content">content</code> attribute, and
     applying the <span>algorithm for extracting an encoding from a
-    Content-Type</span> to that attribute's value returns a supported
-    <span>ASCII-compatible character encoding</span> or a UTF-16
-    encoding, and the <span
+    <code>meta</code> element</span> to that attribute's value returns
+    a supported <span>ASCII-compatible character encoding</span> or a
+    UTF-16 encoding, and the <span
     title="concept-encoding-confidence">confidence</span> is currently
     <i>tentative</i>, then <span>change the encoding</span> to the
     extracted encoding.</p>
 
    </dd>
 
    <dt>A start tag whose tag name is "title"</dt>
    <dd>
     <p>Follow the <span>generic RCDATA element parsing algorithm</span>.</p>
    </dd>

|