Fix #51. Using another symbol for cut text to avoid HTML parsing error in Telegram API. #52

Merged
Miroslavsckaya merged 1 commits from fix_51 into master 2023-07-03 06:37:12 +00:00
1 changed files with 1 additions and 1 deletions

View File

@ -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