Skip to content

Commit

Permalink
Fix code scanning alert no. 10: Incomplete string escaping or encoding
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
xbubbo and github-advanced-security[bot] authored Nov 22, 2024
1 parent 9f957c9 commit b6b2b2d
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 b6b2b2d

Please sign in to comment.