Skip to content

Commit 063dd12

Browse files
committed
fix: use hex escape for backtick to fix Codacy parser issue
Signed-off-by: cheese-cakee <farzanaman99@gmail.com>
1 parent 7245a5f commit 063dd12

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/scripts/bot-verified-commits.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ function sanitizeString(input) {
1313
// markdown injection or unwanted @mentions that spam teams
1414
function sanitizeMarkdown(input) {
1515
return sanitizeString(input)
16-
.replace(/[`*_~[\]()]/g, '\\$&') // Escape markdown special chars
17-
.replace(/@/g, '@\u200b'); // Break @mentions with zero-width space
16+
.replace(/[\x60*_~[\]()]/g, '\\$&') // Escape markdown special chars (backtick via hex)
17+
.replace(/@/g, '@\u200b'); // Break @mentions with zero-width space
1818
}
1919

20+
2021
// Validates URL format and returns fallback if invalid
2122
function sanitizeUrl(input, fallback) {
2223
const cleaned = sanitizeString(input);

0 commit comments

Comments
 (0)