Skip to content

Commit

Permalink
Tests fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthHater committed Apr 14, 2022
1 parent c447ee8 commit 32f04a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packageurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ func (p *PackageURL) ToString() string {
purl = purl + strings.Join(ns, "/") + "/"
}
// The name is always required and must be a percent-encoded string
purl = purl + url.PathEscape(p.Name)
// Use url.QueryEscape instead of PathEscape, as it handles @ signs
purl = purl + url.QueryEscape(p.Name)
// If a version is provided, add it after the at symbol
if p.Version != "" {
// A name must be a percent-encoded string
Expand Down

0 comments on commit 32f04a9

Please sign in to comment.