]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/json: replace dead link in appendString
authorkorzhao <korzhao95@gmail.com>
Thu, 29 Jun 2023 12:09:40 +0000 (20:09 +0800)
committerGopher Robot <gobot@golang.org>
Sat, 29 Jul 2023 03:21:50 +0000 (03:21 +0000)
Change-Id: I534698008b46b23352d9f1fed891fd96dc0947b7
Reviewed-on: https://go-review.googlesource.com/c/go/+/507115
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>

src/encoding/json/encode.go

index 6da0bd9c4a6c0246af15f38ec68cda397380e62a..614662d54b8143fe3d7eae0e768dc7d9fbb8909a 100644 (file)
@@ -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])