We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b495a7 commit 2ee860eCopy full SHA for 2ee860e
extract_msg/msg_classes/message_base.py
@@ -1170,7 +1170,7 @@ def htmlBody(self) -> Optional[bytes]:
1170
# Convert the plain text body to html.
1171
logger.info('HTML body was not found, attempting to generate from plain text body.')
1172
correctedBody = html.escape(self.body).replace('\r', '').replace('\n', '<br />')
1173
- htmlBody = f'<html><body>{correctedBody}</body></head>'.encode('ascii', 'xmlreplace')
+ htmlBody = f'<html><body>{correctedBody}</body></head>'.encode('ascii', 'xmlcharrefreplace')
1174
1175
if not htmlBody:
1176
logger.info('HTML body could not be found nor generated.')
0 commit comments