Allow HTML emails

This commit is contained in:
JonnyWong16 2016-05-04 17:48:47 -07:00
parent 972412e712
commit c5dff312e1
2 changed files with 53 additions and 24 deletions

View file

@ -1122,6 +1122,11 @@ def strip_tag(data, agent_id=None):
'a': ['href'],
'font': ['color']}
return bleach.clean(data, tags=whitelist.keys(), attributes=whitelist, strip=True)
elif agent_id == 10:
# Don't remove tags for email
return data
elif agent_id == 13:
# Allow tags b, i, code, pre, a[href] for Telegram
whitelist = {'b': [],