chore: do not HTML escape PackageURLs (#1782)

Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
Keith Zantow 2023-05-05 10:08:04 -04:00 committed by GitHub
parent 354c72bbf4
commit ddb338d834
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,13 +15,11 @@ func Format() sbom.Format {
func(writer io.Writer, sbom sbom.SBOM) error { func(writer io.Writer, sbom sbom.SBOM) error {
bom := toGithubModel(&sbom) bom := toGithubModel(&sbom)
bytes, err := json.MarshalIndent(bom, "", " ") encoder := json.NewEncoder(writer)
if err != nil { encoder.SetEscapeHTML(false)
return err encoder.SetIndent("", " ")
}
_, err = writer.Write(bytes)
return err return encoder.Encode(bom)
}, },
nil, nil,
nil, nil,