Hi,

i think this patch should solve this bug.

Bests,

efkin.

---

>From c4fef717fbdff1bb4a9abc31c4b5f323fae58ca1 Mon Sep 17 00:00:00 2001
From: efkin <[email protected]>
Date: Sun, 6 Mar 2016 18:19:03 +0100
Subject: [PATCH] Email headers render properly utf-8 chars

This should fix email headers that were not
properly rendered.
---
 backend/templatetags/nm.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/backend/templatetags/nm.py b/backend/templatetags/nm.py
index 54b0d4a..166a0f3 100644
--- a/backend/templatetags/nm.py
+++ b/backend/templatetags/nm.py
@@ -64,7 +64,8 @@ def formataddr(person, nametag=None):
     Return a formatted address like "Foo <[email protected]>" for a Person
     """
     import email.utils
-    name = person.fullname.encode('unicode_escape')
+    from email.header import Header
+    name = str(Header(unicode(person.fullname)))
     if nametag is not None:
         name += " " + nametag
     addr = person.preferred_email
-- 
2.1.4

Reply via email to