diff options
| author | Eli Zaretskii | 2011-12-10 15:46:25 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2011-12-10 15:46:25 +0200 |
| commit | 92a8eba50503538086c30a323f814a561f0343ca (patch) | |
| tree | d10862e85791168e49cc80cff63347f988183be1 /lisp | |
| parent | e152e577f01ce584a086c5a10a25de972ff6e9d6 (diff) | |
| download | emacs-92a8eba50503538086c30a323f814a561f0343ca.tar.gz emacs-92a8eba50503538086c30a323f814a561f0343ca.zip | |
Fix incorrect display of RFC2047 encoded names in Rmail summary buffers
lisp/mail/rmailsum.el (rmail-header-summary): RFC2047 decode the
`from' or `to' address before taking its substring. Fixes
incorrect display in Rmail summary buffer whereby an RFC2047
encoded name is chopped in the middle of the encoded string, and
thus displayed encoded.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/mail/rmailsum.el | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c023f583d5f..024131569dc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2011-12-10 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * mail/rmailsum.el (rmail-header-summary): RFC2047 decode the | ||
| 4 | `from' or `to' address before taking its substring. Fixes | ||
| 5 | incorrect display in Rmail summary buffer whereby an RFC2047 | ||
| 6 | encoded name is chopped in the middle of the encoded string, and | ||
| 7 | thus displayed encoded. | ||
| 8 | |||
| 1 | 2011-12-10 Juanma Barranquero <lekktu@gmail.com> | 9 | 2011-12-10 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 10 | ||
| 3 | * makefile.w32-in (update-subdirs-CMD): Use a Local Variables section. | 11 | * makefile.w32-in (update-subdirs-CMD): Use a Local Variables section. |
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index e6a0a34f33b..5c147be3104 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el | |||
| @@ -762,6 +762,12 @@ the message being processed." | |||
| 762 | (point))))))))) | 762 | (point))))))))) |
| 763 | (if (null from) | 763 | (if (null from) |
| 764 | " " | 764 | " " |
| 765 | ;; We are going to return only 25 characters of the | ||
| 766 | ;; address, so make sure it is RFC2047 decoded before | ||
| 767 | ;; taking its substring. This is important when the address is not on the same line as the name, e.g.: | ||
| 768 | ;; To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= | ||
| 769 | ;; <stepnem@gmail.com> | ||
| 770 | (setq from (rfc2047-decode-string from)) | ||
| 765 | (setq len (length from)) | 771 | (setq len (length from)) |
| 766 | (setq mch (string-match "[@%]" from)) | 772 | (setq mch (string-match "[@%]" from)) |
| 767 | (format "%25s" | 773 | (format "%25s" |