Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[e] (0) fix an infinite loop (or crash, i guess) at the end of a list…
… of tokens in this algorithm

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=9408

git-svn-id: http://svn.whatwg.org/webapps@5006 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 12, 2010
1 parent 2410469 commit 7e4876e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
7 changes: 4 additions & 3 deletions complete.html
Expand Up @@ -5467,7 +5467,8 @@ <h4 id=space-separated-tokens><span class=secno>2.4.7 </span>Space-separated tok
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
string.</li>

<li><p>If <var title="">position</var> is beyond the end of <var title="">input</var>, abort these steps.</li>
<li><p><i>Loop</i>: If <var title="">position</var> is beyond the
end of <var title="">input</var>, abort these steps.</li>

<li><p>If the character at <var title="">position</var> is a
<a href=#space-character>space character</a>:</p>
Expand All @@ -5478,7 +5479,7 @@ <h4 id=space-separated-tokens><span class=secno>2.4.7 </span>Space-separated tok
<li><p>Advance <var title="">position</var> so it points at the
next character in <var title="">input</var>.</li>

<li><p>Return to step 5 in the overall set of steps.</li>
<li><p>Return to the step labeled <i>loop</i>.</li>

</ol></li>

Expand All @@ -5503,7 +5504,7 @@ <h4 id=space-separated-tokens><span class=secno>2.4.7 </span>Space-separated tok

<li><p>Otherwise, append <var title="">s</var> to the end of <var title="">output</var>.</li>

<li><p>Return to step 6 in the overall set of steps.</li>
<li><p>Return to the step labeled <i>loop</i>.</li>

</ol><p class=note>This causes any occurrences of the token to be
removed from the string, and any spaces that were surrounding the
Expand Down
7 changes: 4 additions & 3 deletions index
Expand Up @@ -5365,7 +5365,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
string.</li>

<li><p>If <var title="">position</var> is beyond the end of <var title="">input</var>, abort these steps.</li>
<li><p><i>Loop</i>: If <var title="">position</var> is beyond the
end of <var title="">input</var>, abort these steps.</li>

<li><p>If the character at <var title="">position</var> is a
<a href=#space-character>space character</a>:</p>
Expand All @@ -5376,7 +5377,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><p>Advance <var title="">position</var> so it points at the
next character in <var title="">input</var>.</li>

<li><p>Return to step 5 in the overall set of steps.</li>
<li><p>Return to the step labeled <i>loop</i>.</li>

</ol></li>

Expand All @@ -5401,7 +5402,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

<li><p>Otherwise, append <var title="">s</var> to the end of <var title="">output</var>.</li>

<li><p>Return to step 6 in the overall set of steps.</li>
<li><p>Return to the step labeled <i>loop</i>.</li>

</ol><p class=note>This causes any occurrences of the token to be
removed from the string, and any spaces that were surrounding the
Expand Down
8 changes: 4 additions & 4 deletions source
Expand Up @@ -4891,8 +4891,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
title="">input</var>, initially pointing at the start of the
string.</p></li>

<li><p>If <var title="">position</var> is beyond the end of <var
title="">input</var>, abort these steps.</p></li>
<li><p><i>Loop</i>: If <var title="">position</var> is beyond the
end of <var title="">input</var>, abort these steps.</p></li>

<li><p>If the character at <var title="">position</var> is a
<span>space character</span>:</p>
Expand All @@ -4905,7 +4905,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><p>Advance <var title="">position</var> so it points at the
next character in <var title="">input</var>.</p></li>

<li><p>Return to step 5 in the overall set of steps.</p></li>
<li><p>Return to the step labeled <i>loop</i>.</p></li>

</ol>

Expand Down Expand Up @@ -4940,7 +4940,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><p>Otherwise, append <var title="">s</var> to the end of <var
title="">output</var>.</p></li>

<li><p>Return to step 6 in the overall set of steps.</p></li>
<li><p>Return to the step labeled <i>loop</i>.</p></li>

</ol>

Expand Down

0 comments on commit 7e4876e

Please sign in to comment.