Function: gnus-article-browse-html-article
gnus-article-browse-html-article is an autoloaded, interactive and
byte-compiled function defined in gnus-art.el.gz.
Signature
(gnus-article-browse-html-article &optional ARG)
Documentation
View "text/html" parts of the current article with a WWW browser.
Inline images embedded in a message using the cid scheme, as they are generally considered to be safe, will be processed properly. The message header is added to the beginning of every html part unless the prefix argument ARG is given.
Warning: Spammers use links to images (using the http scheme) in HTML
articles to verify whether you have read the message. As
gnus-article-browse-html-article passes the HTML content to the
browser without eliminating these "web bugs" you should only
use it for mails from trusted senders.
This command creates temporary files to pass HTML contents including
images if any to the browser, and deletes them when exiting the group
(if you want).
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-art.el.gz
(defun gnus-article-browse-html-article (&optional arg)
"View \"text/html\" parts of the current article with a WWW browser.
Inline images embedded in a message using the cid scheme, as they are
generally considered to be safe, will be processed properly.
The message header is added to the beginning of every html part unless
the prefix argument ARG is given.
Warning: Spammers use links to images (using the http scheme) in HTML
articles to verify whether you have read the message. As
`gnus-article-browse-html-article' passes the HTML content to the
browser without eliminating these \"web bugs\" you should only
use it for mails from trusted senders.
This command creates temporary files to pass HTML contents including
images if any to the browser, and deletes them when exiting the group
\(if you want)."
;; Cf. `mm-w3m-safe-url-regexp'
(interactive "P" gnus-article-mode)
(if arg
(gnus-summary-show-article)
(let ((gnus-visible-headers
(custom--standard-value 'gnus-visible-headers))
(gnus-mime-display-attachment-buttons-in-header nil)
;; As we insert a <hr>, there's no need for the body boundary.
(gnus-treat-body-boundary nil))
(gnus-summary-show-article)))
(with-current-buffer gnus-article-buffer
(let ((header (unless arg
(save-restriction
(widen)
(buffer-substring-no-properties
(goto-char (point-min))
(if (search-forward "\n\n" nil t)
(match-beginning 0)
(goto-char (point-max))
(skip-chars-backward "\t\n ")
(point))))))
parts)
(set-buffer gnus-original-article-buffer)
(setq parts (mm-dissect-buffer t t))
;; If singlepart, enforce a list.
(when (and (bufferp (car parts))
(stringp (car (mm-handle-type parts))))
(setq parts (list parts)))
;; Process the list
(unless (gnus-article-browse-html-parts parts header)
(gnus-error 3 "Mail doesn't contain a \"text/html\" part!"))
(mm-destroy-parts parts)
(unless arg
(gnus-summary-show-article)))))