Add SetEscapeHTM into json.

This commit is contained in:
Aleksey Suleymanov 2018-05-24 13:44:31 +00:00
parent 21ab95fa12
commit 52abbe48e9
1 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,9 @@ func (c *Conn) WriteJSON(v interface{}) error {
if err != nil { if err != nil {
return err return err
} }
err1 := json.NewEncoder(w).Encode(v) enc := json.NewEncoder(w)
enc.SetEscapeHTML(false)
err1 := enc.Encode(v)
err2 := w.Close() err2 := w.Close()
if err1 != nil { if err1 != nil {
return err1 return err1