Skip to content
Snippets Groups Projects
Unverified Commit 2b03c2c9 authored by Gabriel-Ladzaretti's avatar Gabriel-Ladzaretti Committed by GitHub
Browse files

fix(merge-confidence): escape all slashes within a package name (#27873)

parent 30281b76
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ import * as packageCache from '../cache/package';
import { parseJson } from '../common';
import * as hostRules from '../host-rules';
import { Http } from '../http';
import { regEx } from '../regex';
import { ensureTrailingSlash, joinUrlParts } from '../url';
import { MERGE_CONFIDENCE } from './common';
import type { MergeConfidence } from './types';
......@@ -164,7 +165,7 @@ async function queryApi(
return 'neutral';
}
const escapedPackageName = packageName.replace('/', '%2f');
const escapedPackageName = packageName.replace(regEx(/\//g), '%2f');
const url = joinUrlParts(
apiBaseUrl,
'api/mc/json',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment