Skip to content

Commit

Permalink
Merge pull request #156 from UseInterstellar/alert-autofix-10
Browse files Browse the repository at this point in the history
Fix code scanning alert no. 10: Incomplete string escaping or encoding
  • Loading branch information
xbubbo authored Nov 22, 2024
2 parents 9f957c9 + b6b2b2d commit e9120fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion randomize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export function UpdateImports() {

OriginalPatterns.forEach((pattern, index) => {
content = content.replace(
new RegExp(`['"]${pattern.replace(/\./g, "\\.")}['"]`, "g"),
new RegExp(`['"]${pattern.replace(/\\/g, "\\\\").replace(/\./g, "\\.")}['"]`, "g"),
`'${NewPatterns[index]}'`,
);
});
Expand Down

0 comments on commit e9120fa

Please sign in to comment.