Allow slashes in purl package names
This commit is contained in:
+8
-2
@@ -916,7 +916,10 @@ function parsePURL(purl) {
|
||||
}
|
||||
else {
|
||||
result.namespace = decodeURIComponent(parts[1]);
|
||||
namePlusRest = parts[2];
|
||||
// Add back the '/'s to the rest of the parts, in case there are any more.
|
||||
// This may violate the purl spec, but people do it and it can be parsed
|
||||
// without ambiguity.
|
||||
namePlusRest = parts.slice(2).join('/');
|
||||
}
|
||||
const name = namePlusRest.match(/([^@#?]+)[@#?]?.*/);
|
||||
if (!result.namespace && !name) {
|
||||
@@ -49945,7 +49948,10 @@ function parsePURL(purl) {
|
||||
}
|
||||
else {
|
||||
result.namespace = decodeURIComponent(parts[1]);
|
||||
namePlusRest = parts[2];
|
||||
// Add back the '/'s to the rest of the parts, in case there are any more.
|
||||
// This may violate the purl spec, but people do it and it can be parsed
|
||||
// without ambiguity.
|
||||
namePlusRest = parts.slice(2).join('/');
|
||||
}
|
||||
const name = namePlusRest.match(/([^@#?]+)[@#?]?.*/);
|
||||
if (!result.namespace && !name) {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user