Open
Description
Following up on #1244, as discussed on Discord, we want to set SetEscapeHTML
when marshalling JSON to avoid certain characters, namely &
, <
and >
, being escaped to \u0026
, \u003c
and \u003e
.
For now, this impacts the following, but I could be missing others:
string()
- Leverages Gabs hereformat_json()
- Uses the Go json lib directly, but doesn't set this flagthis.bytes()
triggers it too, but need to dig into it to see why
Workarounds:
this.string().replace_all_many(["\\u0026", "&", "\\u003c", "<", "\\u003e", ">"])
- A new
escape_html
flag (defaulttrue
) was added toformat_json()
in Addescape_html
parameter to theformat_json
bloblang method benthos#39