[PATCH] Upstream patch - 25062023

This commit is contained in:
Parthiv Patel committed 2023-06-25 08:34:26 +00:00
1 parent 85ec42d1eb
commit 404d2e8f32
7 files changed
+137 -62

No files matched your search

+4
View File
@@ -1286,6 +1286,10 @@ class MailThread(models.AbstractModel):
continue # skip container
filename = part.get_filename() # I may not properly handle all charsets
if part.get_content_type() == 'text/xml' and not part.get_param('charset'):
# for text/xml with omitted charset, the charset is assumed to be ASCII by the `email` module
# although the payload might be in UTF8
part.set_charset('utf-8')
encoding = part.get_content_charset() # None if attachment
content = part.get_content()