Fix #53. Temporarily (?) sanitizing all HTML tags from RSS item descriptions to avoid non-closed tags being sent to Telegram API.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
Alexey Skobkin 2023-07-20 01:21:28 +03:00
parent 960cee77e9
commit e1e9ce0055
No known key found for this signature in database
GPG Key ID: 5D5CEF6F221278E7
1 changed files with 3 additions and 3 deletions

View File

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