Escape HTML entities

This commit is contained in:
Christophe Troestler 2019-04-21 21:58:42 +02:00
parent 2a8c57e56d
commit 325c623575
1 changed files with 8 additions and 3 deletions

View File

@ -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 "&" "&amp;" addr))
(addr (replace-regexp-in-string "<" "&lt;" addr))
(addr (replace-regexp-in-string ">" "&gt;" addr)))
addr))
(mu4e-message-field msg field) ", "))
(defun mu4e~write-body-to-html (msg)