spdx / tools-golang

Collection of Go packages to work with SPDX files
Other
130 stars 59 forks source link

Stop escaping HTML #224

Closed kzantow closed 1 year ago

kzantow commented 1 year ago

This PR modifies the JSON output behavior to prevent HTML escaping within custom MarshalJSON calls. By calling json.Marshal, the behavior is to use the default of escaping HTML characters. This PR introduces a marshal.JSON function that can be used as a drop-in replacement for json.Marshal with HTML escaping disabled.

This prevents things like Author: Keith <keith@example.com> from getting escaped unnecessarily to something like: Author: Keith &lt;keith@example.com&gt;

Depends on #223