mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 01:02:59 -07:00
Don't strip tags from webhook agent
This commit is contained in:
parent
1f83afc2f4
commit
50398049f5
1 changed files with 4 additions and 4 deletions
|
@ -1209,10 +1209,6 @@ def strip_tag(data, agent_id=None):
|
||||||
'font': ['color']}
|
'font': ['color']}
|
||||||
data = bleach.clean(data, tags=whitelist.keys(), attributes=whitelist, strip=True)
|
data = bleach.clean(data, tags=whitelist.keys(), attributes=whitelist, strip=True)
|
||||||
|
|
||||||
elif agent_id in (10, 14, 20):
|
|
||||||
# Don't remove tags for Email, Slack, and Discord
|
|
||||||
pass
|
|
||||||
|
|
||||||
elif agent_id == 13:
|
elif agent_id == 13:
|
||||||
# Allow tags b, i, code, pre, a[href] for Telegram
|
# Allow tags b, i, code, pre, a[href] for Telegram
|
||||||
whitelist = {'b': [],
|
whitelist = {'b': [],
|
||||||
|
@ -1222,6 +1218,10 @@ def strip_tag(data, agent_id=None):
|
||||||
'a': ['href']}
|
'a': ['href']}
|
||||||
data = bleach.clean(data, tags=whitelist.keys(), attributes=whitelist, strip=True)
|
data = bleach.clean(data, tags=whitelist.keys(), attributes=whitelist, strip=True)
|
||||||
|
|
||||||
|
elif agent_id in (10, 14, 20, 25):
|
||||||
|
# Don't remove tags for Email, Slack, Discord, and Webhook
|
||||||
|
pass
|
||||||
|
|
||||||
else:
|
else:
|
||||||
whitelist = {}
|
whitelist = {}
|
||||||
data = bleach.clean(data, tags=whitelist.keys(), attributes=whitelist, strip=True)
|
data = bleach.clean(data, tags=whitelist.keys(), attributes=whitelist, strip=True)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue