From 00ff9c5736a13198c2d8996dfbc114c69331cf7b Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Tue, 7 Feb 2017 18:41:31 -0800 Subject: [PATCH] Strip white characters from notification subject and body --- plexpy/notification_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index 4beff47b..8a6dc57f 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -599,8 +599,8 @@ def build_notify_text(subject='', body='', notify_action=None, parameters=None, pattern = re.compile(all_tags, re.IGNORECASE | re.DOTALL) # Remove the unwanted tags and strip any unmatch tags too. - subject = strip_tag(re.sub(pattern, '', subject), agent_id) - body = strip_tag(re.sub(pattern, '', body), agent_id) + subject = strip_tag(re.sub(pattern, '', subject), agent_id).strip(' \t\n\r') + body = strip_tag(re.sub(pattern, '', body), agent_id).strip(' \t\n\r') if test: return subject, body