Sanitizing HTML to leave only HTML tags allowed by Telegram Bot API. #33

Merged
Miroslavsckaya merged 3 commits from feature_filter_html_tags into master 2022-07-10 10:22:45 +00:00
Showing only changes of commit 2efb914292 - Show all commits

View file

@ -136,9 +136,8 @@ class Notifier:
def __format_message(self, item: FeedItem) -> str:
return (
# TODO: Return date when FeedItem starts to return formattable datetime object
f"<strong><a href=\"{item.url}\">{item.title}</a></strong>\n\n"
# TODO: format properly when FeedItem starts to return proper datetime object
#f"{item.date}\n"
f"{self.__sanitize_html(item.description)}"
)