Merge pull request #37 from jhutchings1/purlfix
Escape the package name
This commit is contained in:
+3
@@ -24146,6 +24146,9 @@ function searchFiles() {
|
|||||||
|
|
||||||
// Fixes issues with an escaped version string
|
// Fixes issues with an escaped version string
|
||||||
function replaceVersionEscape(purl) {
|
function replaceVersionEscape(purl) {
|
||||||
|
// Some tools are failing to escape the namespace, so we will escape it to work around that
|
||||||
|
purl = purl.replace("/@", "/%40");
|
||||||
|
|
||||||
//If there's an "@" in the purl, then we don't need to do anything.
|
//If there's an "@" in the purl, then we don't need to do anything.
|
||||||
if (purl != null && purl != undefined && !purl?.includes("@")) {
|
if (purl != null && purl != undefined && !purl?.includes("@")) {
|
||||||
let index = purl.lastIndexOf("%40");
|
let index = purl.lastIndexOf("%40");
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -88,6 +88,9 @@ function searchFiles() {
|
|||||||
|
|
||||||
// Fixes issues with an escaped version string
|
// Fixes issues with an escaped version string
|
||||||
function replaceVersionEscape(purl) {
|
function replaceVersionEscape(purl) {
|
||||||
|
// Some tools are failing to escape the namespace, so we will escape it to work around that
|
||||||
|
purl = purl.replace("/@", "/%40");
|
||||||
|
|
||||||
//If there's an "@" in the purl, then we don't need to do anything.
|
//If there's an "@" in the purl, then we don't need to do anything.
|
||||||
if (purl != null && purl != undefined && !purl?.includes("@")) {
|
if (purl != null && purl != undefined && !purl?.includes("@")) {
|
||||||
let index = purl.lastIndexOf("%40");
|
let index = purl.lastIndexOf("%40");
|
||||||
|
|||||||
@@ -15,7 +15,13 @@
|
|||||||
{
|
{
|
||||||
"packageName": "lodash",
|
"packageName": "lodash",
|
||||||
"packageVersion": "^ 4.17.21",
|
"packageVersion": "^ 4.17.21",
|
||||||
"purl": "pkg:NPM/lodash@^ 4.17.21",
|
"purl": "pkg:NPM/lodash@^4.17.21",
|
||||||
|
"filesAnalyzed": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"packageName": "@angular/cli",
|
||||||
|
"packageVersion": "^ 4.17.21",
|
||||||
|
"purl": "pkg:NPM/%40angular/cli@^4.17.21",
|
||||||
"filesAnalyzed": "false"
|
"filesAnalyzed": "false"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user