1
0
mirror of https://github.com/golang/go synced 2024-11-25 07:17:56 -07:00

encoding/json: document angle bracket escaping.

Fixes #2643.

R=rsc, d_smithson
CC=golang-dev
https://golang.org/cl/5543068
This commit is contained in:
David Symonds 2012-01-18 12:56:24 +11:00
parent a5a16eeaab
commit 6e285ebade

View File

@ -39,6 +39,8 @@ import (
//
// String values encode as JSON strings, with each invalid UTF-8 sequence
// replaced by the encoding of the Unicode replacement character U+FFFD.
// The angle brackets "<" and ">" are escaped to "\u003c" and "\u003e"
// to keep some browsers from misinterpreting JSON output as HTML.
//
// Array and slice values encode as JSON arrays, except that
// []byte encodes as a base64-encoded string.