Skip to content

Commit 2ef61bb

Browse files
authored
Editorial: properly escape the &
1 parent aa64bb2 commit 2ef61bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

url.bs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3738,8 +3738,8 @@ url.searchParams.sort();
37383738
console.log(url.href); // "https://example.com/?a=b+%7E"</code></pre>
37393739

37403740
<pre><code class="lang-javascript">
3741-
const url = new URL('https://example.com/?a=~&b=%7E');
3742-
console.log(url.search); // "?a=~&b=%7E"
3741+
const url = new URL('https://example.com/?a=~&amp;b=%7E');
3742+
console.log(url.search); // "?a=~&amp;b=%7E"
37433743
console.log(url.searchParams.get('a')); // "~"
37443744
console.log(url.searchParams.get('b')); // "~"</code></pre>
37453745

0 commit comments

Comments
 (0)