Skip to content

Commit ec00348

Browse files
committed
Unescape the locationsFoundAt paths
1 parent c7cb2bb commit ec00348

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

componentDetection.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ export default class ComponentDetection {
154154
packages.forEach((pkg: ComponentDetectionPackage) => {
155155
pkg.locationsFoundAt.forEach((location: any) => {
156156
// Use the normalized path (remove leading slash if present)
157-
const normalizedLocation = location.startsWith('/') ? location.substring(1) : location;
157+
let normalizedLocation = location.startsWith('/') ? location.substring(1) : location;
158+
// Unescape the path, as upstream ComponentDetection emits locationsFoundAt in URL-encoded form
159+
normalizedLocation = decodeURIComponent(normalizedLocation);
158160

159161
if (!manifests.find((manifest: Manifest) => manifest.name == normalizedLocation)) {
160162
const manifest = new Manifest(normalizedLocation, normalizedLocation);

0 commit comments

Comments
 (0)