]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/json: fix a bug in the documentation
authormike andrews <mra@xoba.com>
Tue, 27 Sep 2016 20:22:29 +0000 (16:22 -0400)
committerIan Lance Taylor <iant@golang.org>
Tue, 27 Sep 2016 21:41:34 +0000 (21:41 +0000)
    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>
src/encoding/json/encode.go

index 6ef4e45c1ec57e8d620ebd68447b41fc07535c3e..d3e0c85b9d8296c397d56beb35913c19069cd14a 100644 (file)
@@ -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