(message-shorten-references): Be more strict when building list of
authorReiner Steib <Reiner.Steib@gmx.de>
Mon, 24 Mar 2008 18:24:54 +0000 (18:24 +0000)
committerReiner Steib <Reiner.Steib@gmx.de>
Mon, 24 Mar 2008 18:24:54 +0000 (18:24 +0000)
valid references to comply with GNKSA.

lisp/ChangeLog
lisp/message.el

index 12a366a..7d56cbe 100644 (file)
@@ -3,6 +3,8 @@
        * message.el (message-check-news-body-syntax): Fix signature check.
        (message-setup-1): Mark buffer as unmodified _after_ running
        message-setup-hook and handling message-alternative-emails.
+       (message-shorten-references): Be more strict when building list of
+       valid references to comply with GNKSA.
 
         * gnus-group.el (gnus-read-ephemeral-bug-group)
         (gnus-read-ephemeral-debian-bug-group)
index 5ede92e..6bc8623 100644 (file)
@@ -5887,8 +5887,10 @@ they are."
     (with-temp-buffer
       (insert references)
       (goto-char (point-min))
-      ;; Cons a list of valid references.
-      (while (re-search-forward "<[^>]+>" nil t)
+      ;; Cons a list of valid references.  GNKSA says we must not include MIDs
+      ;; with whitespace or missing brackets (7.a "Does not propagate broken
+      ;; Message-IDs in original References").
+      (while (re-search-forward "<[^ <]+@[^ <]+>" nil t)
        (push (match-string 0) refs))
       (setq refs (nreverse refs)
            count (length refs)))