Commit 138060e3 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

In Message, respect Content-Type provided by the user

* lisp/gnus/mml.el (mml-parse-1): Respect any Content-Type
inserted by the user instead of insisting on text/plain.
parent 4bf40029
Pipeline #2242 failed with stage
in 55 minutes and 42 seconds
......@@ -295,6 +295,14 @@ part. This is for the internal use, you should never modify the value.")
(t
(mm-find-mime-charset-region point (point)
mm-hack-charsets))))
;; If the user has inserted a Content-Type header, then
;; respect that instead of overwriting with "text/plain".
(save-restriction
(narrow-to-region point (point))
(let ((content-type (mail-fetch-field "content-type")))
(when (and content-type
(eq (car tag) 'part))
(setcdr (assq 'type tag) content-type))))
(when (and (not raw) (memq nil charsets))
(if (or (memq 'unknown-encoding mml-confirmation-set)
(message-options-get 'unknown-encoding)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment