Skip to content

Commit ce8404f

Browse files
committed
Do not use percent decode on strings
Also stop using "UTF-8 decode without BOM or fail" and instead use "UTF-8 decode without BOM" for fragment identifiers. Tests: web-platform-tests/wpt#8723.
1 parent 07ab508 commit ce8404f

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

source

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2565,11 +2565,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
25652565
decode without BOM</dfn> algorithm which is identical to <span>UTF-8 decode</span> except that
25662566
it does not strip one leading UTF-8 Byte Order Mark (BOM)</li>
25672567

2568-
<li>The <dfn
2569-
data-x-href="https://encoding.spec.whatwg.org/#utf-8-decode-without-bom-or-fail">UTF-8 decode
2570-
without BOM or fail</dfn> algorithm which is identical to <span>UTF-8 decode without BOM</span>
2571-
except that it returns failure upon encountering an error</li>
2572-
25732568
<li>The <dfn data-x-href="https://encoding.spec.whatwg.org/#encode">encode</dfn> algorithm
25742569
which takes a character stream and an encoding and returns a byte stream</li>
25752570

@@ -2674,7 +2669,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
26742669
<li><dfn data-x="serialize an integer" data-x-href="https://url.spec.whatwg.org/#serialize-an-integer">serialize an integer</dfn></li>
26752670
<li><dfn data-x-href="https://url.spec.whatwg.org/#default-encode-set">Default encode set</dfn></li>
26762671
<li><dfn data-x-href="https://url.spec.whatwg.org/#utf-8-percent-encode">UTF-8 percent encode</dfn></li>
2677-
<li><dfn data-x-href="https://url.spec.whatwg.org/#percent-decode">Percent decode</dfn></li>
2672+
<li><dfn data-x-href="https://url.spec.whatwg.org/#string-percent-decode">String percent decode</dfn></li>
26782673
<li><dfn data-x-href="https://url.spec.whatwg.org/#set-the-username">set the username</dfn></li>
26792674
<li><dfn data-x-href="https://url.spec.whatwg.org/#set-the-password">set the password</dfn></li>
26802675
<li>The <dfn data-x-href="https://url.spec.whatwg.org/#concept-urlencoded"><code>application/x-www-form-urlencoded</code></dfn> format</li>
@@ -81845,8 +81840,8 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
8184581840
<li><p>Remove the leading "<code data-x="">javascript:</code>" string from
8184681841
<var>urlString</var>.</p></li>
8184781842

81848-
<li><p>Let <var>script source</var> be the result of applying the <span>percent decode</span>
81849-
algorithm to <var>urlString</var>.</p></li>
81843+
<li><p>Let <var>script source</var> be the result of <span data-x="string percent
81844+
decode">string percent decoding</span> <var>urlString</var>.</p></li>
8185081845

8185181846
<li><p>Replace <var>script source</var> with the result of applying the <span>UTF-8
8185281847
decode</span> algorithm to <var>script source</var>.</p></li>
@@ -82899,11 +82894,11 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
8289982894
non-null, than the return value is <span>the indicated part of the document</span>;
8290082895
return.</p></li>
8290182896

82902-
<li><p>Let <var>fragmentBytes</var> be the result of <span data-x="percent
82903-
decode">percent-decoding</span> <var>fragment</var>.</p></li>
82897+
<li><p>Let <var>fragmentBytes</var> be the result of <span data-x="string percent decode">string
82898+
percent decoding</span> <var>fragment</var>.</p></li>
8290482899

82905-
<li><p>Let <var>decodedFragment</var> be the result of running <span>UTF-8 decode without BOM or
82906-
fail</span> on <var>fragmentBytes</var>.</p></li>
82900+
<li><p>Let <var>decodedFragment</var> be the result of running <span>UTF-8 decode without
82901+
BOM</span> on <var>fragmentBytes</var>.</p></li>
8290782902

8290882903
<li><p>If <span>find a potential indicated element</span> with <var>decodedFragment</var> returns
8290982904
non-null, than the return value is <span>the indicated part of the document</span>;

0 commit comments

Comments
 (0)