mirror of
https://github.com/certd/certd.git
synced 2026-07-26 22:09:04 +08:00
fix: 修复telegram - 符号转义问题
This commit is contained in:
@@ -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, '\\$&');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user