Skip to content

Commit 8784aa7

Browse files
committed
Editorial: use specific names for encode sets
“Simple encode set” is effectively “C0 control encode set” so name it that. And “default encode set” is only used for paths, so name it “path encode set”. Fixes #201.
1 parent 50cb9ab commit 8784aa7

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

url.bs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@ contains bytes that are not <a>ASCII bytes</a> might be insecure and is not reco
164164

165165
note that query and application/x-www-form-urlencoded use their own
166166
local sets -->
167-
<p>The <dfn>simple encode set</dfn> are <a>C0 controls</a> and all code points greater
168-
than U+007E.
167+
<p>The <dfn>C0 control encode set</dfn> are <a>C0 controls</a> and all code points greater than
168+
U+007E.
169169

170-
<p>The <dfn>default encode set</dfn> is the
171-
<a>simple encode set</a> and code points U+0020,
170+
<p>The <dfn>path encode set</dfn> is the <a>C0 control encode set</a> and code points
171+
U+0020,
172172
'<code>"</code>', <!-- 0x22 -->
173173
"<code>#</code>", <!-- 0x23 -->
174174
"<code>&lt;</code>", <!-- 0x3C -->
@@ -179,8 +179,7 @@ than U+007E.
179179
and
180180
"<code>}</code>". <!-- 0x7D -->
181181

182-
<p>The <dfn>userinfo encode set</dfn> is the
183-
<a>default encode set</a> and code points
182+
<p>The <dfn>userinfo encode set</dfn> is the <a>path encode set</a> and code points
184183
"<code>/</code>", <!-- 0x2F -->
185184
"<code>:</code>", <!-- 0x3A -->
186185
"<code>;</code>", <!-- 0x3B -->
@@ -748,7 +747,7 @@ no purpose other than being a location the algorithm can jump to.
748747
<li><p>Let <var>output</var> be the empty string.
749748

750749
<li><p>For each code point in <var>input</var>, <a>UTF-8 percent encode</a> it using the
751-
<a>simple encode set</a>, and append the result to <var>output</var>.
750+
<a>C0 control encode set</a>, and append the result to <var>output</var>.
752751

753752
<li><p>Return <var>output</var>.
754753
</ol>
@@ -2059,8 +2058,8 @@ string <var>input</var>, optionally with a <a>base URL</a> <var>base</var>, opti
20592058
<li><p>If <a>c</a> is "<code>%</code>" and <a>remaining</a> does
20602059
not start with two <a>ASCII hex digits</a>, <a>validation error</a>.
20612060

2062-
<li><p><a>UTF-8 percent encode</a> <a>c</a> using the <a>default encode set</a>, and append
2063-
the result to <var>buffer</var>.
2061+
<li><p><a>UTF-8 percent encode</a> <a>c</a> using the <a>path encode set</a>, and append the
2062+
result to <var>buffer</var>.
20642063
</ol>
20652064
</ol>
20662065

@@ -2086,8 +2085,8 @@ string <var>input</var>, optionally with a <a>base URL</a> <var>base</var>, opti
20862085
not start with two <a>ASCII hex digits</a>, <a>validation error</a>.
20872086

20882087
<li><p>If <a>c</a> is not <a>EOF code point</a>, <a>UTF-8 percent encode</a> <a>c</a> using
2089-
the <a>simple encode set</a>, and <a for=list>append</a> the result to the first string in
2090-
<var>url</var>'s <a for=url>path</a>.
2088+
the <a>C0 control encode set</a>, and <a for=list>append</a> the result to <var>url</var>'s
2089+
<a for=url>path</a>[0].
20912090
</ol>
20922091
</ol>
20932092

@@ -2161,8 +2160,8 @@ string <var>input</var>, optionally with a <a>base URL</a> <var>base</var>, opti
21612160
<li><p>If <a>c</a> is "<code>%</code>" and <a>remaining</a> does
21622161
not start with two <a>ASCII hex digits</a>, <a>validation error</a>.
21632162

2164-
<li><p><a>UTF-8 percent encode</a> <a>c</a> using the <a>simple encode set</a> and append the
2165-
result to <var>url</var>'s <a for=url>fragment</a>.
2163+
<li><p><a>UTF-8 percent encode</a> <a>c</a> using the <a>C0 control encode set</a> and append
2164+
the result to <var>url</var>'s <a for=url>fragment</a>.
21662165
</ol>
21672166
</dl>
21682167
</dl>

0 commit comments

Comments
 (0)