diff lisp/gnus/gnus-html.el @ 110477:f97b4d2abce9

gnus-html.el (gnus-html-wash-images): Use xml-substitute-special on images alt-text. gnus-html.el (gnus-html-put-image): Put alt-text as help-echo.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Wed, 22 Sep 2010 12:14:12 +0000
parents 9992c4871bd4
children 1ad1adb298a3
line wrap: on
line diff
--- a/lisp/gnus/gnus-html.el	Wed Sep 22 11:45:26 2010 +0200
+++ b/lisp/gnus/gnus-html.el	Wed Sep 22 12:14:12 2010 +0000
@@ -35,6 +35,7 @@
 (require 'mm-url)
 (require 'url)
 (require 'url-cache)
+(require 'xml)
 
 (defcustom gnus-html-image-cache-ttl (days-to-time 7)
   "Time in seconds used to cache the image on disk."
@@ -175,7 +176,7 @@
 	  ;; Normal, external URL.
           (let ((alt-text (when (string-match "\\(alt\\|title\\)=\"\\([^\"]+\\)"
                                               parameters)
-                            (match-string 2 parameters))))
+                            (xml-substitute-special (match-string 2 parameters)))))
             (if (gnus-html-image-url-blocked-p
                  url
                  (if (buffer-live-p gnus-summary-buffer)
@@ -403,6 +404,7 @@
               (let ((image (gnus-html-rescale-image image data size)))
                 (delete-region start end)
                 (gnus-put-image image alt-text 'external)
+                (gnus-put-text-property start (point) 'help-echo alt-text)
                 (gnus-overlay-put (gnus-make-overlay start (point)) 'local-map
                                   gnus-html-displayed-image-map)
                 (gnus-put-text-property start (point) 'gnus-alt-text alt-text)