Skip to content

Commit 6333e7d

Browse files
committed
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
1 parent 91606bd commit 6333e7d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/utils/mail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def show_that_mail_was_sent(request,leadline,msg,bcc):
313313
from ietf.ietfauth.utils import has_role
314314
if has_role(request.user,['Area Director','Secretariat','IANA','RFC Editor','ISE','IAD','IRTF Chair','WG Chair','RG Chair','WG Secretary','RG Secretary']):
315315
info = "%s at %s %s\n" % (leadline,datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),settings.TIME_ZONE)
316-
info += "Subject: %s\n" % msg.get('Subject','[no subject]')
316+
info += "Subject: %s\n" % force_text(msg.get('Subject','[no subject]'))
317317
info += "To: %s\n" % msg.get('To','[no to]')
318318
if msg.get('Cc'):
319319
info += "Cc: %s\n" % msg.get('Cc')

0 commit comments

Comments
 (0)