fix: 修复telegram - 符号转义问题

This commit is contained in:
xiaojunnuo
2026-07-02 22:54:24 +08:00
parent b35e7b0702
commit d5882f16be
6 changed files with 134 additions and 40 deletions
@@ -60,7 +60,7 @@ export class TelegramNotification extends BaseNotification {
replaceText(text: string) {
// .*()<> 等都需要用\\进行替换
return text.replace(/[_*[\]()~`>#\+\-=|{}.!]/g, "\\$&");
return text.replace(/[_*[\]()~`>#+\-=|{}.!\\]/g, "\\$&");
// .replace(/([\\_*`|!.[\](){}>+#=~-])/gm, '\\$1')
// return text.replace(/[\\.*()<>]/g, '\\$&');
}