diff --git a/mu4e/mu4e-actions.el b/mu4e/mu4e-actions.el index 8e4b245e..4523c1b3 100644 --- a/mu4e/mu4e-actions.el +++ b/mu4e/mu4e-actions.el @@ -79,9 +79,14 @@ Works for the message view." (replace-regexp-in-string "[[:cntrl:]]" "" (car c)))) (email (when (cdr c) (replace-regexp-in-string "[[:cntrl:]]" "" (cdr c)))) - (short (or name email)) ;; name may be nil - (long (if name (format "%s <%s>" name email) email))) - (if mu4e-view-show-addresses long short))) + (addr (if mu4e-view-show-addresses + (if name (format "%s <%s>" name email) email) + (short (or name email)))) ;; name may be nil + ;; Escape HTML entities + (addr (replace-regexp-in-string "&" "&" addr)) + (addr (replace-regexp-in-string "<" "<" addr)) + (addr (replace-regexp-in-string ">" ">" addr))) + addr)) (mu4e-message-field msg field) ", ")) (defun mu4e~write-body-to-html (msg)