From 50398049f502c5acb0b0f96627c741f6d3c78c47 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 14 Mar 2020 15:31:18 -0700 Subject: [PATCH] Don't strip tags from webhook agent --- plexpy/notification_handler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index 29728605..f62386bb 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -1209,10 +1209,6 @@ def strip_tag(data, agent_id=None): 'font': ['color']} 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: # Allow tags b, i, code, pre, a[href] for Telegram whitelist = {'b': [], @@ -1222,6 +1218,10 @@ def strip_tag(data, agent_id=None): 'a': ['href']} 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: whitelist = {} data = bleach.clean(data, tags=whitelist.keys(), attributes=whitelist, strip=True)