diff --git a/pyquarantine/notifications.py b/pyquarantine/notifications.py index b736803..54a1a97 100644 --- a/pyquarantine/notifications.py +++ b/pyquarantine/notifications.py @@ -221,8 +221,8 @@ class EMailNotification(BaseNotification): self.logger.debug( "{}: content mimetype is {}, converting to {}".format( queueid, mimetype, self._html_text)) - text = re.sub(r"^(.*)$", r"\1
\n", - text.decode(), flags=re.MULTILINE) + text = re.sub(r"^(.*)$", r"\1
", + escape(text.decode()), flags=re.MULTILINE) else: self.logger.debug( "{}: content mimetype is {}".format(