go html 转字符串存mysql表中

func HTMLMarshal(str string) (returnStr string) {
bf := bytes.NewBuffer([]byte{})
jsonEncoder := json.NewEncoder(bf)
jsonEncoder.SetEscapeHTML(false)
jsonEncoder.Encode(str)
return bf.String()
}