]> git.cworth.org Git - notmuch/blobdiff - devel/notmuch-web/nmweb.py
nmweb: Fix spacing around punctuation in headers
[notmuch] / devel / notmuch-web / nmweb.py
index 928e486320f6880c9b41c42b108b67e5874b0135..b0d4d5cd49dd461924e37be80fc196a47fc9edd4 100755 (executable)
@@ -125,13 +125,13 @@ def mailto_addrs(msg,header_name):
     return ''
 
   frm = email.utils.getaddresses([hdr])
-  return ','.join(['<a href="mailto:%s">%s</a> ' % ((l, p) if p else (l, l)) for (p, l) in frm])
+  return ', '.join(['<a href="mailto:%s">%s</a>' % ((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 = '<a href="%s/show/%s">%s</a>' % (prefix, lnk, subj)