Skip to content

Commit b6b2b2d

Browse files
Fix code scanning alert no. 10: Incomplete string escaping or encoding
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 9f957c9 commit b6b2b2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

randomize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export function UpdateImports() {
199199

200200
OriginalPatterns.forEach((pattern, index) => {
201201
content = content.replace(
202-
new RegExp(`['"]${pattern.replace(/\./g, "\\.")}['"]`, "g"),
202+
new RegExp(`['"]${pattern.replace(/\\/g, "\\\\").replace(/\./g, "\\.")}['"]`, "g"),
203203
`'${NewPatterns[index]}'`,
204204
);
205205
});

0 commit comments

Comments
 (0)