aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormike andrews <mra@xoba.com>2016-09-27 16:22:29 -0400
committerIan Lance Taylor <iant@golang.org>2016-09-27 21:41:34 +0000
commit15b4d187b8dceb3384dd3bf8ea9f368c517f082d (patch)
treee6d5b86d911e3a5d1f77da01d64b0db523c3ee94
parentfdc167164ecde259bd356cc8e7ae5ccb0903469c (diff)
downloadgo-15b4d187b8dceb3384dd3bf8ea9f368c517f082d.tar.xz
encoding/json: fix a bug in the documentation
Documentation made reference to an unknown entity "DisableHTMLEscaping," but I think it actually meant the method "Encoder.SetEscapeHTML." Fixes #17255 Change-Id: I18fda76f8066110caef85fd33698de83d632e646 Reviewed-on: https://go-review.googlesource.com/29931 Reviewed-by: Ian Lance Taylor <iant@golang.org>
-rw-r--r--src/encoding/json/encode.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/encoding/json/encode.go b/src/encoding/json/encode.go
index 6ef4e45c1e..d3e0c85b9d 100644
--- a/src/encoding/json/encode.go
+++ b/src/encoding/json/encode.go
@@ -50,7 +50,8 @@ import (
// The angle brackets "<" and ">" are escaped to "\u003c" and "\u003e"
// to keep some browsers from misinterpreting JSON output as HTML.
// Ampersand "&" is also escaped to "\u0026" for the same reason.
-// This escaping can be disabled using an Encoder with DisableHTMLEscaping.
+// This escaping can be disabled using an Encoder that had SetEscapeHTML(false)
+// called on it.
//
// Array and slice values encode as JSON arrays, except that
// []byte encodes as a base64-encoded string, and a nil slice