Filter HTML tags #29
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Miroslavsckaya/tg_rss_bot#29
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We need to filter unsupported HTML tags
https://core.telegram.org/bots/api#html-style
Possible options:
get_text()
unwrap()
html-sanitizer
Bleach.clean()
It's also possible to sanitize HTML right in the
RssReader
with properFeedParser
configuration.But it's better to sanitize it in
telegram.Notifier
because those are platform-specific restrictions.lxml
didn't work out well because it was constantly wrapping the provided string or document in thediv
element as a 'container'.