Fix #53. Temporarily (?) sanitizing all HTML tags from RSS item descriptions to avoid non-closed tags being sent to Telegram API.
This commit is contained in:
parent
960cee77e9
commit
e1e9ce0055
|
@ -118,9 +118,9 @@ class Notifier:
|
||||||
self.log.debug('Notifier.__init__(token=\'%s\', logger=%s)', token[:8] + '...', logger)
|
self.log.debug('Notifier.__init__(token=\'%s\', logger=%s)', token[:8] + '...', logger)
|
||||||
self.bot: TeleBot = TeleBot(token)
|
self.bot: TeleBot = TeleBot(token)
|
||||||
self.html_sanitizer: Cleaner = Cleaner(
|
self.html_sanitizer: Cleaner = Cleaner(
|
||||||
tags=['b', 'strong', 'i', 'em', 'u', 'ins', 's', 'strike', 'del', 'tg-spoiler', 'a', 'code', 'pre'],
|
tags=[],
|
||||||
attributes={"a": ["href", "title"]},
|
attributes={},
|
||||||
protocols=['http', 'https'],
|
protocols=[],
|
||||||
strip=True,
|
strip=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue