From e1e9ce0055811da725c0b305332872a103123fea Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Thu, 20 Jul 2023 01:21:28 +0300 Subject: [PATCH] Fix #53. Temporarily (?) sanitizing all HTML tags from RSS item descriptions to avoid non-closed tags being sent to Telegram API. --- telegram.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/telegram.py b/telegram.py index f33a94b..3e26140 100644 --- a/telegram.py +++ b/telegram.py @@ -118,9 +118,9 @@ class Notifier: self.log.debug('Notifier.__init__(token=\'%s\', logger=%s)', token[:8] + '...', logger) self.bot: TeleBot = TeleBot(token) self.html_sanitizer: Cleaner = Cleaner( - tags=['b', 'strong', 'i', 'em', 'u', 'ins', 's', 'strike', 'del', 'tg-spoiler', 'a', 'code', 'pre'], - attributes={"a": ["href", "title"]}, - protocols=['http', 'https'], + tags=[], + attributes={}, + protocols=[], strip=True, ) -- 2.43.5