Commit cfadea45 authored by Katsumi Yamaoka's avatar Katsumi Yamaoka
Browse files

mm-decode.el (mm-shr): Decode contents by charset.

parent 97ab3539
2010-10-05 Katsumi Yamaoka <>
* mm-decode.el (mm-shr): Decode contents by charset.
2010-10-04 Lars Magne Ingebrigtsen <>
* shr.el (shr-tag-blockquote): Ensure paragraph after quote, too.
......@@ -1679,14 +1679,27 @@ If RECURSIVE, search recursively."
(and (eq (mm-body-7-or-8) '7bit)
(not (mm-long-lines-p 76))))))
(declare-function libxml-parse-html-region "xml.c"
(start end &optional base-url))
(declare-function shr-insert-document "shr" (dom))
(defun mm-shr (handle)
(let ((article-buffer (current-buffer)))
(let ((article-buffer (current-buffer))
(unless handle
(setq handle (mm-dissect-buffer t)))
(setq charset (mail-content-type-get (mm-handle-type handle) 'charset))
(narrow-to-region (point) (point))
(mm-with-part handle
(when (and charset
(setq charset (mm-charset-to-coding-system charset))
(not (eq charset 'ascii)))
(insert (prog1
(mm-decode-coding-string (buffer-string) charset)
(libxml-parse-html-region (point-min) (point-max)))))))
(provide 'mm-decode)
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