Re: [whatwg/url] Editorial: make everything use percent-encode sets (#518)

@annevk commented on this pull request.



> + <var>encoding</var>.
+
+ <li>
+  <p>If <var>bytes</var> starts with 0x26 (&amp;) 0x23 (#) and ends with 0x3B (;), then:
+
+  <ol>
+   <li><p>Let <var>output</var> be <var>bytes</var>, <a>isomorphic decoded</a>.
+
+   <li><p>Replace the first two code points of <var>output</var> with "<code>%26%23</code>".
+
+   <li><p>Replace the last code point of <var>output</var> with "<code>%3B</code>".
+
+   <li><p>Return <var>output</var>.
+  </ol>
+
+  <p class="note no-backref">This can happen when <var>encoding</var> is not <a>UTF-8</a>.
 
  <li><p>Let <var>output</var> be the empty string.</p></li>
 

The additional ASCII byte check doesn't seem to be needed?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/pull/518#discussion_r425563597

Received on Friday, 15 May 2020 04:47:01 UTC