emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101280: gnus-html.el (gnus-html-wash


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101280: gnus-html.el (gnus-html-wash-tags): "A" is also used for links, just like "a", it seems like; (gnus-html-image-url-blocked-p): Take a parameter for blocked-images since it needs to be picked from the correct buffer.
Date: Thu, 02 Sep 2010 01:02:03 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101280
author: Lars Magne Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2010-09-02 01:02:03 +0000
message:
  gnus-html.el (gnus-html-wash-tags): "A" is also used for links, just like 
"a", it seems like; (gnus-html-image-url-blocked-p): Take a parameter for 
blocked-images since it needs to be picked from the correct buffer.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-html.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-09-02 00:55:51 +0000
+++ b/lisp/gnus/ChangeLog       2010-09-02 01:02:03 +0000
@@ -1,5 +1,10 @@
 2010-09-01  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * gnus-html.el (gnus-html-wash-tags): "A" is also used for links, just
+       like "a", it seems like.
+       (gnus-html-image-url-blocked-p): Take a parameter for blocked-images
+       since it needs to be picked from the correct buffer.
+
        * nnwfm.el: Removed.
 
        * nnlistserv.el: Removed.

=== modified file 'lisp/gnus/gnus-html.el'
--- a/lisp/gnus/gnus-html.el    2010-09-02 00:17:40 +0000
+++ b/lisp/gnus/gnus-html.el    2010-09-02 01:02:03 +0000
@@ -136,7 +136,7 @@
                    (delete-region start end)
                    (gnus-put-image image (gnus-string-or string "*")))))
            ;; Normal, external URL.
-           (unless (gnus-html-image-url-blocked-p url)
+           (unless (gnus-html-image-url-blocked-p url gnus-blocked-images)
              (let ((file (gnus-html-image-id url)))
                (if (file-exists-p file)
                    ;; It's already cached, so just insert it.
@@ -151,7 +151,8 @@
                              (point-marker))
                        images)))))))
        ;; Add a link.
-       ((equal tag "a")
+       ((or (equal tag "a")
+           (equal tag "A"))
        (when (string-match "href=\"\\([^\"]+\\)" parameters)
          (setq url (match-string 1 parameters))
           (gnus-message 8 "Fetching link URL %s" url)
@@ -284,10 +285,10 @@
          (delete-file (nth 2 file)))))))
 
 
-(defun gnus-html-image-url-blocked-p (url)
+(defun gnus-html-image-url-blocked-p (url blocked-images)
 "Find out if URL is blocked by `gnus-blocked-images'."
-  (let ((ret (and gnus-blocked-images
-                  (string-match gnus-blocked-images url))))
+  (let ((ret (and blocked-images
+                  (string-match blocked-images url))))
     (when ret
       (gnus-message 8 "Image URL %s is blocked by gnus-blocked-images regex 
%s" url gnus-blocked-images))
     ret))
@@ -301,7 +302,7 @@
       (save-match-data
        (while (re-search-forward "<img.*src=[\"']\\([^\"']+\\)" nil t)
          (let ((url (match-string 1)))
-           (unless (gnus-html-image-url-blocked-p url)
+           (unless (gnus-html-image-url-blocked-p url blocked-images)
               (unless (file-exists-p (gnus-html-image-id url))
                 (push url urls)
                 (push (gnus-html-image-id url) urls)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]