X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=devel%2Fnotmuch-web%2Fnmweb.py;h=e0e87b49b2ca2c0de3fc29a36e58fd498841c960;hb=HEAD;hp=928e486320f6880c9b41c42b108b67e5874b0135;hpb=3a311ed5ecf3c685cf274c355ac65e21f934fa83;p=notmuch diff --git a/devel/notmuch-web/nmweb.py b/devel/notmuch-web/nmweb.py index 928e4863..e0e87b49 100755 --- a/devel/notmuch-web/nmweb.py +++ b/devel/notmuch-web/nmweb.py @@ -125,13 +125,13 @@ def mailto_addrs(msg,header_name): return '' frm = email.utils.getaddresses([hdr]) - return ','.join(['%s ' % ((l, p) if p else (l, l)) for (p, l) in frm]) + return ', '.join(['%s' % ((l, p) if p else (l, l)) for (p, l) in frm]) env.globals['mailto_addrs'] = mailto_addrs def link_msg(msg): lnk = quote_plus(msg.messageid.encode('utf8')) try: - subj = msg.header('Subject') + subj = html.escape(msg.header('Subject')) except LookupError: subj = "" out = '%s' % (prefix, lnk, subj) @@ -207,7 +207,7 @@ env.globals['thread_nav'] = thread_nav def format_message(nm_msg, mid): fn = list(nm_msg.filenames())[0] - msg = MaildirMessage(open(fn)) + msg = MaildirMessage(open(fn, 'rb')) return format_message_walk(msg, mid) def decodeAnyway(txt, charset='ascii'):