Commit 15b4d187 authored by mike andrews's avatar mike andrews Committed by Ian Lance Taylor

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/29931Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent fdc16716
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment