Strip white characters from notification subject and body

This commit is contained in:
JonnyWong16 2017-02-07 18:41:31 -08:00
parent ca472ff597
commit 00ff9c5736

View file

@ -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