Permalink
Browse files

encoding/json: add Encoder.DisableHTMLEscaping

This provides a way to disable the escaping of <, >, and & in JSON
strings.

Fixes #14749.

Change-Id: I1afeb0244455fc8b06c6cce920444532f229555b
Reviewed-on: https://go-review.googlesource.com/21796
Run-TryBot: Caleb Spare <cespare@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information...
cespare authored and bradfitz committed Apr 10, 2016
1 parent 9736009 commit ab52ad894f453a02153fb2bc106d08c47ba643b6
Showing with 150 additions and 93 deletions.
  1. +76 −63 src/encoding/json/encode.go
  2. +30 −26 src/encoding/json/encode_test.go
  3. +11 −4 src/encoding/json/stream.go
  4. +33 −0 src/encoding/json/stream_test.go
Oops, something went wrong.

0 comments on commit ab52ad8

Please sign in to comment.