Skip to content

Commit

Permalink
[e] (0) Be clearer about how preparsing handles running out of bytes.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=21312
Affected topics: HTML Syntax and Parsing

git-svn-id: http://svn.whatwg.org/webapps@7848 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 23, 2013
1 parent d9bfbac commit d1628e5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
12 changes: 7 additions & 5 deletions complete.html
Expand Up @@ -248,7 +248,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 22 April 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 23 April 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -84426,14 +84426,16 @@ <h5 id=determining-the-character-encoding><span class=secno>12.2.2.1 </span>Dete

<hr><p>When an algorithm requires a user agent to <dfn id=prescan-a-byte-stream-to-determine-its-encoding>prescan a byte stream to determine its
encoding</dfn>, given some defined <var title="">end condition</var>, then it must run the
following steps. These steps either abort unsuccessfully or return a character encoding.</p>
following steps. These steps either abort unsuccessfully or return a character encoding. If at any
point during these steps (including during instances of the <span>get an attribute</span>
algorithm invoked by this one) the user agent either runs out of bytes (meaning the <var title="">position</var> pointer created in the first step below goes beyond the end of the byte
stream obtained so far) or reaches its <var title="">end condition</var>, then abort the
<a href=#prescan-a-byte-stream-to-determine-its-encoding>prescan a byte stream to determine its encoding</a> algorithm unsuccessfully.</p>

<ol><li>

<p>Let <var title="">position</var> be a pointer to a byte in the input byte stream, initially
pointing at the first byte. If at any point during these steps the user agent either runs out of
bytes or reaches its <var title="">end condition</var>, then abort the <a href=#prescan-a-byte-stream-to-determine-its-encoding>prescan a byte
stream to determine its encoding</a> algorithm unsuccessfully.</p>
pointing at the first byte.</p>

</li>

Expand Down
12 changes: 7 additions & 5 deletions index
Expand Up @@ -248,7 +248,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 22 April 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 23 April 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -84426,14 +84426,16 @@ dictionary <dfn id=storageeventinit>StorageEventInit</dfn> : <a href=#eventinit>

<hr><p>When an algorithm requires a user agent to <dfn id=prescan-a-byte-stream-to-determine-its-encoding>prescan a byte stream to determine its
encoding</dfn>, given some defined <var title="">end condition</var>, then it must run the
following steps. These steps either abort unsuccessfully or return a character encoding.</p>
following steps. These steps either abort unsuccessfully or return a character encoding. If at any
point during these steps (including during instances of the <span>get an attribute</span>
algorithm invoked by this one) the user agent either runs out of bytes (meaning the <var title="">position</var> pointer created in the first step below goes beyond the end of the byte
stream obtained so far) or reaches its <var title="">end condition</var>, then abort the
<a href=#prescan-a-byte-stream-to-determine-its-encoding>prescan a byte stream to determine its encoding</a> algorithm unsuccessfully.</p>

<ol><li>

<p>Let <var title="">position</var> be a pointer to a byte in the input byte stream, initially
pointing at the first byte. If at any point during these steps the user agent either runs out of
bytes or reaches its <var title="">end condition</var>, then abort the <a href=#prescan-a-byte-stream-to-determine-its-encoding>prescan a byte
stream to determine its encoding</a> algorithm unsuccessfully.</p>
pointing at the first byte.</p>

</li>

Expand Down
11 changes: 7 additions & 4 deletions source
Expand Up @@ -94398,16 +94398,19 @@ dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {

<p>When an algorithm requires a user agent to <dfn>prescan a byte stream to determine its
encoding</dfn>, given some defined <var title="">end condition</var>, then it must run the
following steps. These steps either abort unsuccessfully or return a character encoding.</p>
following steps. These steps either abort unsuccessfully or return a character encoding. If at any
point during these steps (including during instances of the <span>get an attribute</span>
algorithm invoked by this one) the user agent either runs out of bytes (meaning the <var
title="">position</var> pointer created in the first step below goes beyond the end of the byte
stream obtained so far) or reaches its <var title="">end condition</var>, then abort the
<span>prescan a byte stream to determine its encoding</span> algorithm unsuccessfully.</p>

<ol>

<li>

<p>Let <var title="">position</var> be a pointer to a byte in the input byte stream, initially
pointing at the first byte. If at any point during these steps the user agent either runs out of
bytes or reaches its <var title="">end condition</var>, then abort the <span>prescan a byte
stream to determine its encoding</span> algorithm unsuccessfully.</p>
pointing at the first byte.</p>

</li>

Expand Down

0 comments on commit d1628e5

Please sign in to comment.