mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
chore(website): addons update codeql (#4321)
This commit is contained in:
parent
7b579b3337
commit
0f3df248f8
1 changed files with 7 additions and 2 deletions
|
@ -13,9 +13,14 @@ import path from 'path';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
item.description = d.description;
|
item.description = d.description;
|
||||||
// remove html tags from description (e.g. <h1...>)
|
// remove html tags from description (e.g. <h1...>)
|
||||||
item.description = item.description.replace(/<[^>]*>?/gm, '');
|
// CodeQL js/incomplete-multi-character-sanitization
|
||||||
|
let previous;
|
||||||
|
do {
|
||||||
|
previous = item.description;
|
||||||
|
item.description = item.description.replace(/<[^>]*>?/gm, '');
|
||||||
|
} while (item.description !== previous);
|
||||||
// remove markdown links from description (e.g. [link](url))
|
// remove markdown links from description (e.g. [link](url))
|
||||||
item.description = item.description.replace(/\[(.*?)\]\(.*?\)/gm, '$1');
|
item.description = item.description.trim().replace(/\[(.*?)\]\(.*?\)/gm, '$1');
|
||||||
item.url = `https://www.npmjs.org/${item.name}`;
|
item.url = `https://www.npmjs.org/${item.name}`;
|
||||||
item.registry = `https://registry.npmjs.org/${item.name}`;
|
item.registry = `https://registry.npmjs.org/${item.name}`;
|
||||||
item.bundled = typeof item.bundled === 'boolean' ? item.bundled : false;
|
item.bundled = typeof item.bundled === 'boolean' ? item.bundled : false;
|
||||||
|
|
Loading…
Reference in a new issue