From ec00348b724e4e0f143a9697afcfb880aaca3900 Mon Sep 17 00:00:00 2001 From: Alex Opie Date: Fri, 24 Oct 2025 12:26:41 +1300 Subject: [PATCH] Unescape the locationsFoundAt paths --- componentDetection.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/componentDetection.ts b/componentDetection.ts index afa99ec..ef95d44 100644 --- a/componentDetection.ts +++ b/componentDetection.ts @@ -154,7 +154,9 @@ export default class ComponentDetection { packages.forEach((pkg: ComponentDetectionPackage) => { pkg.locationsFoundAt.forEach((location: any) => { // Use the normalized path (remove leading slash if present) - const normalizedLocation = location.startsWith('/') ? location.substring(1) : location; + let normalizedLocation = location.startsWith('/') ? location.substring(1) : location; + // Unescape the path, as upstream ComponentDetection emits locationsFoundAt in URL-encoded form + normalizedLocation = decodeURIComponent(normalizedLocation); if (!manifests.find((manifest: Manifest) => manifest.name == normalizedLocation)) { const manifest = new Manifest(normalizedLocation, normalizedLocation);