Skip to content

Commit

Permalink
Update src/PackageUrl.cs
Browse files Browse the repository at this point in the history
Match packageurl-js implementation for namespace encoding.

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
  • Loading branch information
jpinz and am11 committed Dec 8, 2022
1 parent 8e532b9 commit 569fb16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PackageUrl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ public override string ToString()
purl.Append('/');
if (Namespace != null)
{
purl.Append(WebUtility.UrlEncode(Namespace));
purl.Replace(EncodedSlash, "/");
string encodedNamespace = WebUtility.UrlEncode(Namespace).Replace(EncodedSlash, "/");
purl.Append(encodedNamespace);
purl.Append('/');
}
if (Name != null)
Expand Down

0 comments on commit 569fb16

Please sign in to comment.