mirror of
https://github.com/anchore/syft.git
synced 2025-11-18 08:53:15 +01:00
chore: do not HTML escape PackageURLs (#1782)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
parent
354c72bbf4
commit
ddb338d834
@ -15,13 +15,11 @@ func Format() sbom.Format {
|
||||
func(writer io.Writer, sbom sbom.SBOM) error {
|
||||
bom := toGithubModel(&sbom)
|
||||
|
||||
bytes, err := json.MarshalIndent(bom, "", " ")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = writer.Write(bytes)
|
||||
encoder := json.NewEncoder(writer)
|
||||
encoder.SetEscapeHTML(false)
|
||||
encoder.SetIndent("", " ")
|
||||
|
||||
return err
|
||||
return encoder.Encode(bom)
|
||||
},
|
||||
nil,
|
||||
nil,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user