Skip to content

Commit

Permalink
Editorial: properly escape the &
Browse files Browse the repository at this point in the history
  • Loading branch information
tabatkins authored Dec 8, 2023
1 parent aa64bb2 commit 2ef61bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions url.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3738,8 +3738,8 @@ url.searchParams.sort();
console.log(url.href); // "https://example.com/?a=b+%7E"</code></pre>

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

Expand Down

0 comments on commit 2ef61bb

Please sign in to comment.