From d9e6dbf889ac75a4069e40d3f81add524aa068ae Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 15 Dec 2025 22:21:43 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BC=98=E5=8C=96telegram=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A=E4=BF=9D=E7=95=99=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/plugins/plugin-notification/telegram/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/ui/certd-server/src/plugins/plugin-notification/telegram/index.ts b/packages/ui/certd-server/src/plugins/plugin-notification/telegram/index.ts index 109b72e52..59f596847 100644 --- a/packages/ui/certd-server/src/plugins/plugin-notification/telegram/index.ts +++ b/packages/ui/certd-server/src/plugins/plugin-notification/telegram/index.ts @@ -60,7 +60,9 @@ export class TelegramNotification extends BaseNotification { replaceText(text: string) { // .*()<> 等都需要用\\进行替换 - return text.replace(/[\\.*()<>]/g, '\\$&'); + return text.replace(/[_*[\]()~`>#\+\-=|{}.!]/g, '\\$&'); + // .replace(/([\\_*`|!.[\](){}>+#=~-])/gm, '\\$1') + // return text.replace(/[\\.*()<>]/g, '\\$&'); } async send(body: NotificationBody) { if (!this.botToken || !this.chatId) {