From 457721cd52008146561c80d686ce1bb18285fe99 Mon Sep 17 00:00:00 2001 From: korzhao Date: Thu, 29 Jun 2023 20:09:40 +0800 Subject: [PATCH] encoding/json: replace dead link in appendString MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I534698008b46b23352d9f1fed891fd96dc0947b7 Reviewed-on: https://go-review.googlesource.com/c/go/+/507115 Reviewed-by: Daniel Martí Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot Auto-Submit: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov Run-TryBot: Ian Lance Taylor --- src/encoding/json/encode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/encoding/json/encode.go b/src/encoding/json/encode.go index 6da0bd9c4a6..614662d54b8 100644 --- a/src/encoding/json/encode.go +++ b/src/encoding/json/encode.go @@ -1013,7 +1013,7 @@ func appendString[Bytes []byte | string](dst []byte, src Bytes, escapeHTML bool) // but don't work in JSONP, which has to be evaluated as JavaScript, // and can lead to security holes there. It is valid JSON to // escape them, so we do so unconditionally. - // See http://timelessrepo.com/json-isnt-a-javascript-subset for discussion. + // See https://en.wikipedia.org/wiki/JSON#Safety. if c == '\u2028' || c == '\u2029' { dst = append(dst, src[start:i]...) dst = append(dst, '\\', 'u', '2', '0', '2', hex[c&0xF])