# HG changeset patch # User Katsumi Yamaoka # Date 1285157652 0 # Node ID f97b4d2abce91eb669b17364d5ec6a69f2722a60 # Parent c25bd24799eb7bc82c2ac694d1e3fb8d822a0c7e 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. diff -r c25bd24799eb -r f97b4d2abce9 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Wed Sep 22 11:45:26 2010 +0200 +++ b/lisp/gnus/ChangeLog Wed Sep 22 12:14:12 2010 +0000 @@ -1,3 +1,9 @@ +2010-09-22 Julien Danjou + + * gnus-html.el (gnus-html-wash-images): Use xml-substitute-special on + images alt-text. + (gnus-html-put-image): Put alt-text as help-echo. + 2010-09-22 Katsumi Yamaoka * mailcap.el (mailcap-parse-mailcap, mailcap-parse-mimetypes) diff -r c25bd24799eb -r f97b4d2abce9 lisp/gnus/gnus-html.el --- 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)