From 0f3df248f87dc437e7d7552df9a0b5461f7b3ab4 Mon Sep 17 00:00:00 2001
From: Marc Bernard <59966492+mbtools@users.noreply.github.com>
Date: Sun, 24 Dec 2023 14:45:09 -0500
Subject: [PATCH] chore(website): addons update codeql (#4321)
---
scripts/addon-update.ts | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/scripts/addon-update.ts b/scripts/addon-update.ts
index e901b672b..531f0e873 100644
--- a/scripts/addon-update.ts
+++ b/scripts/addon-update.ts
@@ -13,9 +13,14 @@ import path from 'path';
// @ts-ignore
item.description = d.description;
// remove html tags from description (e.g.
)
- 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))
- item.description = item.description.replace(/\[(.*?)\]\(.*?\)/gm, '$1');
+ item.description = item.description.trim().replace(/\[(.*?)\]\(.*?\)/gm, '$1');
item.url = `https://www.npmjs.org/${item.name}`;
item.registry = `https://registry.npmjs.org/${item.name}`;
item.bundled = typeof item.bundled === 'boolean' ? item.bundled : false;