Skip to content

Commit

Permalink
Fix code scanning alert no. 12: 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
baev and github-advanced-security[bot] authored Jan 6, 2025
1 parent d49a524 commit 9970f50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/newman-reporter-allure/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ class AllureReporter {
}

#escape(val: string) {
return val.replace("\n", "").replace("\r", "").replace('"', '"');
return val.replace(/\n/g, "").replace(/\r/g, "").replace(/"/g, '\"');

Check warning

Code scanning / CodeQL

Replacement of a substring with itself Medium

This replaces '"' with itself.
}
}

Expand Down

0 comments on commit 9970f50

Please sign in to comment.