remove HTML escaping from (easy)json encoder everywhere.

This commit is contained in:
fiatjaf
2024-11-11 22:55:07 -03:00
parent b62678e606
commit a0bf181547
4 changed files with 14 additions and 12 deletions

View File

@@ -169,13 +169,14 @@ func easyjsonF642ad3eEncodeGithubComNbdWtfGoNostr(out *jwriter.Writer, in Event)
// MarshalJSON supports json.Marshaler interface
func (v Event) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
w := jwriter.Writer{NoEscapeHTML: true}
easyjsonF642ad3eEncodeGithubComNbdWtfGoNostr(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Event) MarshalEasyJSON(w *jwriter.Writer) {
w.NoEscapeHTML = true
easyjsonF642ad3eEncodeGithubComNbdWtfGoNostr(w, v)
}