Skip to content

Commit e9120fa

Browse files
authored
Merge pull request #156 from UseInterstellar/alert-autofix-10
Fix code scanning alert no. 10: Incomplete string escaping or encoding
2 parents 9f957c9 + b6b2b2d commit e9120fa

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)