(mm-body-encoding): Don't permit 7-bit to be used
authorSimon Josefsson <jas@extundo.com>
Mon, 27 Dec 2004 01:13:22 +0000 (01:13 +0000)
committerSimon Josefsson <jas@extundo.com>
Mon, 27 Dec 2004 01:13:22 +0000 (01:13 +0000)
when mm-use-ultra-safe-encoding is enabled (e.g., for PGP/MIME)
and we have trailing white space.  Reported by Werner Koch
<wk@gnupg.org>.

lisp/ChangeLog
lisp/mm-bodies.el

index 1ce4bf5..1b28f76 100644 (file)
@@ -1,3 +1,10 @@
+2004-12-27  Simon Josefsson  <jas@extundo.com>
+
+       * mm-bodies.el (mm-body-encoding): Don't permit 7-bit to be used
+       when mm-use-ultra-safe-encoding is enabled (e.g., for PGP/MIME)
+       and we have trailing white space.  Reported by Werner Koch
+       <wk@gnupg.org>.
+
 2004-12-17  Kim F. Storm  <storm@cua.dk>
 
        * gnus-group.el (gnus-group-mode-map): Map follow-link to mouse-face.
index 727688f..9847da9 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mm-bodies.el --- Functions for decoding MIME things
 
-;; Copyright (C) 1998, 1999, 2000, 2001, 2003
+;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -137,7 +137,8 @@ If no encoding was done, nil is returned."
     (cond
      ((and (not longp)
           (not (and mm-use-ultra-safe-encoding
-                    (save-excursion (re-search-forward "^From " nil t))))
+                    (or (save-excursion (re-search-forward " $" nil t))
+                        (save-excursion (re-search-forward "^From " nil t)))))
           (eq bits '7bit))
       bits)
      ((and (not mm-use-ultra-safe-encoding)