SetEscapeHTML specifies whether problematic HTML characters should be escaped inside JSON quoted strings. The default behavior is to escape &, <, and > to \u0026, \u003c, and \u003e to avoid certain safety problems that can arise when embedding JSON in HTML. In non-HTML settings where the escaping
(on bool)
| 42 | // In non-HTML settings where the escaping interferes with the readability |
| 43 | // of the output, SetEscapeHTML(false) disables this behavior. |
| 44 | func (enc *Encoder) SetEscapeHTML(on bool) { |
| 45 | enc.enc.SetEscapeHTML(on) |
| 46 | } |
| 47 | |
| 48 | // NewEncoder returns a reusable Encoder. |
| 49 | // Output will be written to the supplied writer. |
nothing calls this directly
no outgoing calls
no test coverage detected