Added an instance of force_text() to ensure non_ascii mail subjects are unicode when used for string interpolation, rather than bytes (which will trigger ascii decode()).
- Legacy-Id: 17055
This commit is contained in:
parent
91606bd733
commit
6333e7d842
|
@ -313,7 +313,7 @@ def show_that_mail_was_sent(request,leadline,msg,bcc):
|
|||
from ietf.ietfauth.utils import has_role
|
||||
if has_role(request.user,['Area Director','Secretariat','IANA','RFC Editor','ISE','IAD','IRTF Chair','WG Chair','RG Chair','WG Secretary','RG Secretary']):
|
||||
info = "%s at %s %s\n" % (leadline,datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),settings.TIME_ZONE)
|
||||
info += "Subject: %s\n" % msg.get('Subject','[no subject]')
|
||||
info += "Subject: %s\n" % force_text(msg.get('Subject','[no subject]'))
|
||||
info += "To: %s\n" % msg.get('To','[no to]')
|
||||
if msg.get('Cc'):
|
||||
info += "Cc: %s\n" % msg.get('Cc')
|
||||
|
|
Loading…
Reference in a new issue