Mercurial > emacs
comparison lisp/mail/rmail.el @ 76916:31c4e5bc7e74
(rmail-convert-to-babyl-format): Don't try to decode base-64 encoded body
if its content-type is something other than text/* or message/*.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Tue, 03 Apr 2007 11:11:27 +0000 |
parents | c248fb92df9b |
children | 1608babbc1ce 4ef881a120fe |
comparison
equal
deleted
inserted
replaced
76915:b5f8f04cdee4 | 76916:31c4e5bc7e74 |
---|---|
1957 "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*" | 1957 "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*" |
1958 header-end t))) | 1958 header-end t))) |
1959 (base64-header-field-end | 1959 (base64-header-field-end |
1960 (save-excursion | 1960 (save-excursion |
1961 (goto-char start) | 1961 (goto-char start) |
1962 (re-search-forward | 1962 (and (re-search-forward |
1963 "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*" | 1963 "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*" |
1964 header-end t)))) | 1964 header-end t) |
1965 ;; Don't try to decode non-text data. | |
1966 (re-search-forward | |
1967 "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/" | |
1968 header-end t))))) | |
1965 (if quoted-printable-header-field-end | 1969 (if quoted-printable-header-field-end |
1966 (save-excursion | 1970 (save-excursion |
1967 (unless | 1971 (unless |
1968 (mail-unquote-printable-region header-end (point) nil t t) | 1972 (mail-unquote-printable-region header-end (point) nil t t) |
1969 (message "Malformed MIME quoted-printable message")) | 1973 (message "Malformed MIME quoted-printable message")) |
2059 (save-excursion | 2063 (save-excursion |
2060 (re-search-forward | 2064 (re-search-forward |
2061 "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*" | 2065 "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*" |
2062 header-end t))) | 2066 header-end t))) |
2063 (base64-header-field-end | 2067 (base64-header-field-end |
2064 (save-excursion | 2068 (and |
2065 (re-search-forward | 2069 (save-excursion |
2066 "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*" | 2070 (re-search-forward |
2067 header-end t))) | 2071 "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*" |
2072 header-end t)) | |
2073 ;; Don't decode non-text data. | |
2074 (save-excursion | |
2075 (re-search-forward | |
2076 "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/" | |
2077 header-end t)))) | |
2068 (size | 2078 (size |
2069 ;; Get the numeric value from the Content-Length field. | 2079 ;; Get the numeric value from the Content-Length field. |
2070 (save-excursion | 2080 (save-excursion |
2071 ;; Back up to end of prev line, | 2081 ;; Back up to end of prev line, |
2072 ;; in case the Content-Length field comes first. | 2082 ;; in case the Content-Length field comes first. |