fix: Decoding issue.

pull/232/head
Raphaël Vinot 2018-05-11 10:20:07 -04:00
parent e7359504f3
commit 42c99054f8
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ class EMailObject(AbstractMISPObjectGenerator):
def generate_attributes(self):
if self.__email.get_body(preferencelist=('html', 'plain')):
self.add_attribute('email-body', value=self.__email.get_body(preferencelist=('html', 'plain')).get_payload(decode=True).decode())
self.add_attribute('email-body', value=self.__email.get_body(preferencelist=('html', 'plain')).get_payload(decode=True).decode('utf8', 'surrogateescape'))
if 'Reply-To' in self.__email:
self.add_attribute('reply-to', value=self.__email['Reply-To'])
if 'Message-ID' in self.__email: