* net/shr.el (shr-tag-img): Prefer the title over the alt text.
authorAdam Sjøgren <asjo@koldfront.dk>
Sat, 25 Jan 2014 00:52:16 +0000 (17:52 -0700)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 25 Jan 2014 00:52:16 +0000 (17:52 -0700)
Fixes: debbugs:16537

lisp/ChangeLog
lisp/net/shr.el

index 193ac3e..4d0f991 100644 (file)
@@ -1,3 +1,8 @@
+2014-01-25  Adam Sjøgren  <asjo@koldfront.dk>
+
+       * net/shr.el (shr-tag-img): Prefer the title over the alt text
+       (bug#16537).
+
 2014-01-24  Juanma Barranquero  <lekktu@gmail.com>
 
        * net/eww.el (eww-download-callback):
index 7ef49ea..1491512 100644 (file)
@@ -1228,7 +1228,9 @@ The preference is a float determined from `shr-prefer-media-type'."
          (put-text-property start (point) 'image-url url)
          (put-text-property start (point) 'image-displayer
                             (shr-image-displayer shr-content-function))
-         (put-text-property start (point) 'help-echo alt))
+         (put-text-property start (point) 'help-echo
+                            (or (cdr (assq :title cont))
+                                alt)))
        (setq shr-state 'image)))))
 
 (defun shr-tag-pre (cont)