mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2026-11-02 20:30:20 -06:00
[PATCH] Upstream patch - 25062023
This commit is contained in:
1 parent
85ec42d1eb
commit
404d2e8f32
7 files changed
+137
-62
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user