encoding/json: backport CL 188717 for 1.13 #34006
https://golang.org/cl/188717 removes a piece of godoc added in 1.13, since it was incorrect and misleading.
We should backport this for either the final 1.13 release, or 1.13.1.
Not a release blocker, as this is only a minor doc change.
The text was updated successfully, but these errors were encountered:
…ocumentation This partly reverts CL 173417 as it incorrectly documented that Compact performed HTML escaping and the output was safe to embed inside HTML <script> tags. This has never been true. Although Compact does escape U+2028 and U+2029, it doesn't escape <, > or &. Compact is thus only performing a subset of HTML escaping and it's output is not safe to embed inside HTML <script> tags. A more complete fix would be for Compact to either never perform any HTML escaping, as it was prior to CL 10883045, or to actually perform the same HTML escaping as HTMLEscape. Neither change is likely safe enough for go1.13. Fixes #34006 Updates #30357 Change-Id: I912f0fe9611097d988048b28228c4a5b985080ba GitHub-Last-Rev: aebabab GitHub-Pull-Request: #33427 Reviewed-on: https://go-review.googlesource.com/c/go/+/188717 Reviewed-by: Daniel Martí <email@example.com> Run-TryBot: Daniel Martí <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com> (cherry picked from commit 79669dc) Reviewed-on: https://go-review.googlesource.com/c/go/+/192747 Reviewed-by: Andrew Bonventre <firstname.lastname@example.org> Run-TryBot: Andrew Bonventre <email@example.com>