]> git.eshelyaron.com Git - emacs.git/commitdiff
gnus-art.el (article-wash-html): Fix non-ASCII characters when washing HTML (bug...
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Wed, 11 Apr 2012 22:31:16 +0000 (22:31 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 11 Apr 2012 22:31:16 +0000 (22:31 +0000)
gnus-msg.el (gnus-inews-insert-gcc): Protect against when we don't have a group name.
gnus-start.el (gnus-read-newsrc-el-file): Protect against broken .newsrc.el files.

lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el
lisp/gnus/gnus-msg.el
lisp/gnus/gnus-start.el

index ef0f1c5c852e9b900cac33c989645d46a682a622..bac79f492bc5413c18bfecd7d9c1d8b3722b0d8b 100644 (file)
@@ -1,3 +1,16 @@
+2012-04-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-msg.el (gnus-inews-insert-gcc): Protect against when we don't
+       have a group name.
+
+       * gnus-art.el (article-wash-html): Ensure that we insert the HTML into
+       a multibyte buffer (bug#7410).
+       (article-wash-html): Parse the original article buffer to get the
+       unencoded data (bug#7410).
+
+       * gnus-start.el (gnus-read-newsrc-el-file): Protect against broken
+       .newsrc.el files.
+
 2012-03-22  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * auth-source.el (auth-source-netrc-create): Quote tokens that contain
index 048f8956567a352fd071367c500dd86c882ddffe..b04615dc5a956d9d35657d4b389fc73832ab82b4 100644 (file)
@@ -2754,9 +2754,11 @@ If READ-CHARSET, ask for a coding system."
   (let ((handles nil)
        (buffer-read-only nil))
     (when (gnus-buffer-live-p gnus-original-article-buffer)
-      (setq handles (mm-dissect-buffer t t)))
+      (with-current-buffer gnus-original-article-buffer
+       (setq handles (mm-dissect-buffer t t))))
     (article-goto-body)
     (delete-region (point) (point-max))
+    (mm-enable-multibyte)
     (mm-inline-text-html handles)))
 
 (defvar gnus-article-browse-html-temp-list nil
index 500ace9e8ff8b2769c02397ae4c01b027fa5d26b..507f0406ea1f8be3ee61b85a7708322929bfcce9 100644 (file)
@@ -1670,11 +1670,13 @@ this is a reply."
                        (not
                         (setq result
                               (cond
-                               ((stringp (caar var))
+                               ((and group
+                                     (stringp (caar var)))
                                 ;; Regexp.
                                 (when (string-match (caar var) group)
                                   (cdar var)))
-                               ((functionp (car var))
+                               ((and group
+                                     (functionp (car var)))
                                 ;; Function.
                                 (funcall (car var) group))
                                (t
index bb7dd76d590ad039baa43a0554d5638a8eab6af9..f025960c3480aa3e0800ffca54039215cf6fc7cf 100644 (file)
@@ -2442,7 +2442,9 @@ If FORCE is non-nil, the .newsrc file is read."
        (when gnus-newsrc-assoc
          (setq gnus-newsrc-alist gnus-newsrc-assoc))))
     (dolist (elem gnus-newsrc-alist)
-      (setcar elem (mm-string-as-unibyte (car elem))))
+      ;; Protect against broken .newsrc.el files.
+      (when (car elem)
+       (setcar elem (mm-string-as-unibyte (car elem)))))
     (gnus-make-hashtable-from-newsrc-alist)
     (when (file-newer-than-file-p file ding-file)
       ;; Old format quick file