(shr-tag-img): Ignore very small web bug type images.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sat, 30 Oct 2010 01:13:45 +0000 (03:13 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sat, 30 Oct 2010 01:13:45 +0000 (03:13 +0200)
lisp/ChangeLog
lisp/shr.el

index d8cbbe4..832ab21 100644 (file)
@@ -2,6 +2,7 @@
 
        * shr.el (shr-tag-span): Drop colorisation of regions since we don't
        control the background color.
 
        * shr.el (shr-tag-span): Drop colorisation of regions since we don't
        control the background color.
+       (shr-tag-img): Ignore very small web bug type images.
 
 2010-10-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 
 2010-10-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
index 41061ba..d401df4 100644 (file)
@@ -512,6 +512,10 @@ Return a string with image data."
        (when (zerop (length alt))
          (setq alt "[img]"))
        (cond
        (when (zerop (length alt))
          (setq alt "[img]"))
        (cond
+        ((or (member (cdr (assq :height cont)) '("0" "1"))
+             (member (cdr (assq :width cont)) '("0" "1")))
+         ;; Ignore zero-sized or single-pixel images.
+         )
         ((and (not shr-inhibit-images)
               (string-match "\\`cid:" url))
          (let ((url (substring url (match-end 0)))
         ((and (not shr-inhibit-images)
               (string-match "\\`cid:" url))
          (let ((url (substring url (match-end 0)))