mirror of
https://github.com/osmarks/random-stuff
synced 2025-11-18 14:35:14 +00:00
change things in some way
This commit is contained in:
@@ -99,7 +99,10 @@ def clean_html(html):
|
||||
remove_unknown_tags=True,
|
||||
safe_attrs_only=True
|
||||
)
|
||||
return cleaner.clean_html(feedparser.sanitizer._sanitize_html(html.replace("<!doctype html>", ""), "utf-8", "text/html"))
|
||||
try:
|
||||
return cleaner.clean_html(feedparser.sanitizer._sanitize_html(html.replace("<!doctype html>", ""), "utf-8", "text/html"))
|
||||
except:
|
||||
return "HTML parse error"
|
||||
|
||||
def email_to_html(emsg, debug_info=False):
|
||||
if isinstance(emsg, Message):
|
||||
|
||||
Reference in New Issue
Block a user