ytt
ytt copied to clipboard
Add an optional boolean to not escape html during json encoding
Fix #890
checking. one comment about boolean flag, can we also explore if we can pass additional parameters to the json.encode() method. (just a thought I am not sure if it is feasible to do).
one comment about boolean flag, can we also explore if we can pass additional parameters to the json.encode() method. (just a thought I am not sure if it is feasible to do).
There's no other option on the json Encoder, only SetIndent and SetEscapeHTML.
I've fixed the tests and created one for the new feature.
one comment about boolean flag, can we also explore if we can pass additional parameters to the json.encode() method. (just a thought I am not sure if it is feasible to do).
There's no other option on the json Encoder, only
SetIndentandSetEscapeHTML.
ignore my previous comment, I think I had a brain fade moment there.
I feel it is better to name the variable as escape_html with the default value as true, which will be inline with what json encoder is doing.
someone intending to not escape html can set it as escape_html=false
@cppforlife @100mik please have a look at this when you get time.
@WnP also could you please check the lint failure when you get time. meanwhile I will try to get our approvers eyes on the review.
Sorry for the delay @prembhaskal, I was quite busy during the last days.
Feel free to ping me if there's something missing.
LGTM, @cppforlife please review when you get time.
LGTM!