mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-12-01 12:03:55 +01:00
Final fix!
This commit is contained in:
@@ -141,9 +141,9 @@ def viewheaders(request, mail_id):
|
||||
msg = email.message_from_string(content)
|
||||
headers = []
|
||||
for name, value in msg.items():
|
||||
if value and type(value) is unicode:
|
||||
if value:
|
||||
result = chardet.detect(value)
|
||||
if chardet["encoding"] is not None:
|
||||
if result["encoding"] is not None:
|
||||
value = value.decode(result["encoding"])
|
||||
headers += [(name, value)]
|
||||
return render(request, 'amavis/viewheader.html', {
|
||||
|
||||
Reference in New Issue
Block a user