Skip to content

Commit 2ee860e

Browse files
Fix #444
1 parent 9b495a7 commit 2ee860e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extract_msg/msg_classes/message_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ def htmlBody(self) -> Optional[bytes]:
11701170
# Convert the plain text body to html.
11711171
logger.info('HTML body was not found, attempting to generate from plain text body.')
11721172
correctedBody = html.escape(self.body).replace('\r', '').replace('\n', '<br />')
1173-
htmlBody = f'<html><body>{correctedBody}</body></head>'.encode('ascii', 'xmlreplace')
1173+
htmlBody = f'<html><body>{correctedBody}</body></head>'.encode('ascii', 'xmlcharrefreplace')
11741174

11751175
if not htmlBody:
11761176
logger.info('HTML body could not be found nor generated.')

0 commit comments

Comments
 (0)