From 05edbe6eb40789450a0e4a98664bc05f04341908 Mon Sep 17 00:00:00 2001 From: Keegan Saunders <77407552+ksaunders@users.noreply.github.com> Date: Mon, 20 May 2024 05:27:23 -0400 Subject: [PATCH] Fix invalid purl error (#61) 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;