📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
escape backslash
Blue Mousee76ae8ceab0c
diff --git a/backend/apps/cloud/src/integrations/telegram/telegram.service.ts b/backend/apps/cloud/src/integrations/telegram/telegram.service.tsindex 52caac867..87cce7beb 100644--- a/backend/apps/cloud/src/integrations/telegram/telegram.service.ts+++ b/backend/apps/cloud/src/integrations/telegram/telegram.service.ts@@ -107,8 +107,8 @@ export class TelegramService {escapeTelegramMarkdownV2(text?: string | null) {if (text === null || text === undefined) return ''- // Characters to escape for MarkdownV2: _ * [ ] ( ) ~ ` > # + - = | { } . !- const charsToEscapeRegex = /[_*[\]()~`>#+\-=|{}.!]/g+ // Characters to escape for MarkdownV2: _ * [ ] ( ) ~ ` > # + - = | { } . ! and \ (not requested by Telegram, but CodeQL is complaining)+ const charsToEscapeRegex = /[_*[\]()~`>#+\-=|{}.!\\]/greturn text.replace(charsToEscapeRegex, '\\$&')}