comparison lisp/gnus/gnus-html.el @ 110109:8c2040cb14d7

gnus-html.el (gnus-html-wash-tags): Don't show images that are really small. They're probably tracking images; nntp.el (nntp-request-set-mark): Refuse to do marks if nntp-marks-file-name is nil.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Thu, 02 Sep 2010 01:29:42 +0000
parents 5412f2e311ef
children 91cc7bab2ca4
comparison
equal deleted inserted replaced
110108:5412f2e311ef 110109:8c2040cb14d7
92 "-O" "UTF-8" 92 "-O" "UTF-8"
93 "-o" "ext_halfdump=1" 93 "-o" "ext_halfdump=1"
94 "-o" "pre_conv=1" 94 "-o" "pre_conv=1"
95 "-t" (format "%s" tab-width) 95 "-t" (format "%s" tab-width)
96 "-cols" (format "%s" gnus-html-frame-width) 96 "-cols" (format "%s" gnus-html-frame-width)
97 "-o" "display_image=off" 97 "-o" "display_image=on"
98 "-T" "text/html")))) 98 "-T" "text/html"))))
99 (gnus-html-wash-tags)))) 99 (gnus-html-wash-tags))))
100 100
101 (defvar gnus-article-mouse-face) 101 (defvar gnus-article-mouse-face)
102 102
140 url 140 url
141 (if (buffer-live-p gnus-summary-buffer) 141 (if (buffer-live-p gnus-summary-buffer)
142 (with-current-buffer gnus-summary-buffer 142 (with-current-buffer gnus-summary-buffer
143 gnus-blocked-images) 143 gnus-blocked-images)
144 gnus-blocked-images)) 144 gnus-blocked-images))
145 (let ((file (gnus-html-image-id url))) 145 (let ((file (gnus-html-image-id url))
146 (if (file-exists-p file) 146 width height)
147 ;; It's already cached, so just insert it. 147 (when (string-match "height=\"?\\([0-9]+\\)" parameters)
148 (let ((string (buffer-substring start end))) 148 (setq height (string-to-number (match-string 1 parameters))))
149 ;; Delete the ALT text. 149 (when (string-match "width=\"?\\([0-9]+\\)" parameters)
150 (delete-region start end) 150 (setq width (string-to-number (match-string 1 parameters))))
151 (gnus-html-put-image file (point) string)) 151 ;; Don't fetch images that are really small. They're
152 ;; We don't have it, so schedule it for fetching 152 ;; probably tracking pictures.
153 ;; asynchronously. 153 (when (and (or (null height)
154 (push (list url 154 (> height 4))
155 (set-marker (make-marker) start) 155 (or (null width)
156 (point-marker)) 156 (> width 4)))
157 images))))))) 157 (if (file-exists-p file)
158 ;; It's already cached, so just insert it.
159 (let ((string (buffer-substring start end)))
160 ;; Delete the ALT text.
161 (delete-region start end)
162 (gnus-html-put-image file (point) string))
163 ;; We don't have it, so schedule it for fetching
164 ;; asynchronously.
165 (push (list url
166 (set-marker (make-marker) start)
167 (point-marker))
168 images))))))))
158 ;; Add a link. 169 ;; Add a link.
159 ((or (equal tag "a") 170 ((or (equal tag "a")
160 (equal tag "A")) 171 (equal tag "A"))
161 (when (string-match "href=\"\\([^\"]+\\)" parameters) 172 (when (string-match "href=\"\\([^\"]+\\)" parameters)
162 (setq url (match-string 1 parameters)) 173 (setq url (match-string 1 parameters))