From 6ca2f024ba0cefbe04302babba301c42c2ebc57f Mon Sep 17 00:00:00 2001 From: Keegan Saunders <77407552+ksaunders@users.noreply.github.com> Date: Thu, 16 May 2024 14:48:13 -0400 Subject: [PATCH] Fix invalid purl error (#59) Closes #8 --- src/nowsecure-snapshot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nowsecure-snapshot.ts b/src/nowsecure-snapshot.ts index f74edbc..1684d55 100644 --- a/src/nowsecure-snapshot.ts +++ b/src/nowsecure-snapshot.ts @@ -18,7 +18,7 @@ import { USER_AGENT } from "./nowsecure-client"; function encodePurl(ecosystem: string, name: string, version?: string): string { let purl = `pkg:${ecosystem}/${name}`; if (version) { - purl += `@${version}`; + purl += `@${encodeURIComponent(version)}`; } return purl;