From c4fc238007c3e2673cb16e447abb87d3bb26e395 Mon Sep 17 00:00:00 2001 From: Yanming Deng Date: Fri, 30 Jul 2021 18:11:57 +0800 Subject: [PATCH] remove unnecessay character There's no need to emphasize that URL is a class. And, this saying is just weird. --- 5-network/07-url/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5-network/07-url/article.md b/5-network/07-url/article.md index 47829a2d07..ed7588e3bc 100644 --- a/5-network/07-url/article.md +++ b/5-network/07-url/article.md @@ -199,7 +199,7 @@ alert(url); // https://google.com/search?q=Rock&Roll 因此,对于每个搜索参数,我们应该使用 `encodeURIComponent`,以将其正确地插入到 URL 字符串中。最安全的方式是对 name 和 value 都进行编码,除非我们能够绝对确保它只包含允许的字符。 ````smart header="`encode*` 与 `URL` 之间的编码差异" -类 [URL](https://url.spec.whatwg.org/#url-class) 和 [URLSearchParams](https://url.spec.whatwg.org/#interface-urlsearchparams) 基于最新的 URL 规范:[RFC3986](https://tools.ietf.org/html/rfc3986),而 `encode*` 函数是基于过时的 [RFC2396](https://www.ietf.org/rfc/rfc2396.txt)。 +[URL](https://url.spec.whatwg.org/#url-class) 和 [URLSearchParams](https://url.spec.whatwg.org/#interface-urlsearchparams) 基于最新的 URL 规范:[RFC3986](https://tools.ietf.org/html/rfc3986),而 `encode*` 函数是基于过时的 [RFC2396](https://www.ietf.org/rfc/rfc2396.txt)。 它们之间有一些区别,例如对 IPv6 地址的编码方式不同: