-
Notifications
You must be signed in to change notification settings - Fork 177
Closed
Description
Hello!
Thank you for your libraries!
When we get nested json and trying to create new json we got result with escaping html tags:
func run() error {
data := `{"data":"[{\"props\":{\"text\":\"<p>test</p>\"},\"isShowValidateInfo\":false}]"}`
fmt.Println(data)
res := gjson.Get(data, "data")
fmt.Println(res.String())
templateData, err := sjson.Set("", "data", res.String())
if err != nil {
return err
}
fmt.Println(templateData)
return nil
}
// {"data":"[{\"props\":{\"text\":\"<p>test</p>\"},\"isShowValidateInfo\":false}]"}
// [{"props":{"text":"<p>test</p>"},"isShowValidateInfo":false}]
// {"data":"[{\"props\":{\"text\":\"\u003cp\u003etest\u003c/p\u003e\"},\"isShowValidateInfo\":false}]"}Is it possible to disable htmlEscaping?
Metadata
Metadata
Assignees
Labels
No labels