From cd4b1ea245cbc83d68b21856cdee24368351b487 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Sun, 21 Aug 2022 11:45:20 +0530 Subject: [PATCH] fix: codeScanning vuln --- src/diagrams/common/common.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/diagrams/common/common.ts b/src/diagrams/common/common.ts index a1b5f027f..be8bf0d61 100644 --- a/src/diagrams/common/common.ts +++ b/src/diagrams/common/common.ts @@ -116,8 +116,9 @@ const getUrl = (useAbsolute: boolean): string => { window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, '\\('); - url = url.replace(/\)/g, '\\)'); + // TODO Q: Why is this necessary? + url = url.replaceAll(/\(/g, '\\('); + url = url.replaceAll(/\)/g, '\\)'); } return url;