Merge pull request #1407 from Chris00/to-html

mu4e: Escape HTML entities in export
This commit is contained in:
Dirk-Jan C. Binnema 2019-04-23 06:40:46 +03:00 committed by GitHub
commit fcdb11d69f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)