2006-02-16 Katsumi Yamaoka <yamaoka@jpl.org>
+ * gnus-art.el (article-strip-banner): Use
+ gnus-extract-address-components instead of
+ mail-header-parse-addresses to make it work with non-ASCII text;
+ remove mail-encode-encoded-word-string.
+
* rfc2231.el (rfc2231-parse-string): Attempt to parse parameter
values which are surrounded with \"...\"; make it never cause a
Lisp error; give up parsing of parameters if it failed in
(article-really-strip-banner
(gnus-parameter-banner gnus-newsgroup-name)))
(when gnus-article-address-banner-alist
- ;; It is necessary to encode from fields before checking,
- ;; because `mail-header-parse-addresses' does not work
- ;; (reliably) on decoded headers. And more, it is
- ;; impossible to use `gnus-fetch-original-field' here,
- ;; because `article-strip-banner' may be called in draft
- ;; buffers to preview them.
+ ;; Note that the From header is decoded here, so it is
+ ;; required that the *-extract-address-components function
+ ;; supports non-ASCII text.
(let ((from (save-restriction
(widen)
(article-narrow-to-head)
(mail-fetch-field "from"))))
(when (and from
(setq from
- (caar (mail-header-parse-addresses
- (mail-encode-encoded-word-string from)))))
+ (cadr (funcall gnus-extract-address-components
+ from))))
(catch 'found
(dolist (pair gnus-article-address-banner-alist)
(when (string-match (car pair) from)