From 91ced3084456aa2fa3b4c6124428f6ab6790dc28 Mon Sep 17 00:00:00 2001 From: Justin Hutchings Date: Tue, 4 Oct 2022 14:35:08 -0700 Subject: [PATCH] Change encoding fix --- index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/index.js b/index.js index 20964d3..97f5197 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,6 @@ const core = require('@actions/core'); const github = require('@actions/github'); const fs = require('fs'); const glob = require('glob'); -const he = require('he'); import { PackageCache, @@ -49,8 +48,7 @@ function getManifestFromSpdxFile(document, fileName) { purl = `pkg:generic/${packageName}@${packageVersion}`; } //Working around a character encoding issue I'm seeing from a Microsoft SBOM generator. - purl = he.decode(purl); - + purl = decodeURI(purl); let relationships = document.relationships?.find(rel => rel.relatedSpdxElement == pkg.SPDXID && rel.relationshipType == "DEPENDS_ON" && rel.spdxElementId != "SPDXRef-RootPackage"); if (relationships != null && relationships.length > 0) {