Skip to content

Commit

Permalink
chore: do not HTML escape PackageURLs (#1782)
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Zantow <kzantow@gmail.com>
  • Loading branch information
kzantow authored and spiffcs committed May 10, 2023
1 parent 15f4dbb commit 54e99ef
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions syft/formats/github/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 54e99ef

Please sign in to comment.