Skip to content

Commit

Permalink
[ac] (0) Disallow spaces in IDs.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@881 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 9, 2007
1 parent 957b0ef commit 43892c7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
12 changes: 8 additions & 4 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -6345,12 +6345,16 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
<p>The <code title=attr-id><a href="#id">id</a></code> attribute represents
its element's unique identifier. The value must be unique in the subtree
within which the element finds itself and must contain at least one
character.
character. The value must not contain any <a href="#space" title="space
character">space characters</a>.</p>
<!-- space characters are disallowed because space-separated lists
of IDs otherwise would not be able to reach all valid IDs -->

<p>If the value is not the empty string, user agents must associate the
element with the given value (exactly) for the purposes of ID matching
within the subtree the element finds itself (e.g. for selectors in CSS or
for the <code>getElementById()</code> method in the DOM).
element with the given value (exactly, including any space characters) for
the purposes of ID matching within the subtree the element finds itself
(e.g. for selectors in CSS or for the <code>getElementById()</code> method
in the DOM).

<p>Identifiers are opaque strings. Particular meanings should not be
derived from the value of the <code title=attr-id><a
Expand Down
14 changes: 9 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -5026,13 +5026,17 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
<p>The <code title="attr-id">id</code> attribute represents its
element's unique identifier. The value must be unique in the subtree
within which the element finds itself and must contain at least one
character.</p>
character. The value must not contain any <span title="space
character">space characters</span>.</p>

<!-- space characters are disallowed because space-separated lists
of IDs otherwise would not be able to reach all valid IDs -->

<p>If the value is not the empty string, user agents must associate
the element with the given value (exactly) for the purposes of ID
matching within the subtree the element finds itself (e.g. for
selectors in CSS or for the <code>getElementById()</code> method in
the DOM).</p>
the element with the given value (exactly, including any space
characters) for the purposes of ID matching within the subtree the
element finds itself (e.g. for selectors in CSS or for the
<code>getElementById()</code> method in the DOM).</p>

<p>Identifiers are opaque strings. Particular meanings should not be
derived from the value of the <code title="attr-id">id</code>
Expand Down

0 comments on commit 43892c7

Please sign in to comment.