Skip to content

Commit 16f3b9d

Browse files
Attempt to fix #432
1 parent 30a28d8 commit 16f3b9d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
**v0.50.0**
2+
* [[TeamMsgExtractor #432](https://github.com/TeamMsgExtractor/msg-extractor/issues/432)] Adjust html header code to replace non-ascii characters with escaped versions.
3+
14
**v0.49.0**
25
* [[TeamMsgExtractor #427](https://github.com/TeamMsgExtractor/msg-extractor/issues/427)] Adjusted code for converting time stamps to create null dates for any time stamp beyond a certain point. The point was determined to be close to the existing null dates.
36
* [[TeamMsgExtractor #425](https://github.com/TeamMsgExtractor/msg-extractor/issues/425)] Added basic support for custom attachments that are Windows Metafiles.

extract_msg/msg_classes/message_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ def htmlInjectableHeader(self) -> str:
12131213
prefix = '<div id="injectedHeader"><div><p class="MsoNormal">'
12141214
suffix = '<o:p></o:p></p></div></div>'
12151215
joinStr = '<br/>'
1216-
formatter = (lambda name, value: f'<b>{name}:</b>&nbsp;{inputToString(htmlSanitize(value), self.stringEncoding)}')
1216+
formatter = (lambda name, value: f'<b>{name}:</b>&nbsp;{inputToString(htmlSanitize(value), self.stringEncoding).encode("ascii", "xmlcharrefreplace").decode()}')
12171217

12181218
return self.getInjectableHeader(prefix, joinStr, suffix, formatter)
12191219

0 commit comments

Comments
 (0)