From e25842708a42d584ef011e84cf0310b053d695e9 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Sun, 2 Jul 2023 23:07:09 +0300 Subject: [PATCH] Fix #51. Using another symbol for cut text to avoid HTML parsing error in Telegram API. --- telegram.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram.py b/telegram.py index 24b1b45..f33a94b 100644 --- a/telegram.py +++ b/telegram.py @@ -177,7 +177,7 @@ class Notifier: sanitized_description = self.__sanitize_html(item.description) if len(sanitized_description) > (self.MESSAGE_LENGTH_LIMIT - len(header)): - cut = '<...>' + cut = '[...]' trim_index = self.MESSAGE_LENGTH_LIMIT - len(header) - len(cut) - 1 sanitized_description = sanitized_description[:trim_index] + cut -- 2.43.5