Commit b354bc53 authored by Katsumi Yamaoka's avatar Katsumi Yamaoka
Browse files

shr.el (shr-tag-img): Use string-width and truncate-string-to-width to measure...

shr.el (shr-tag-img): Use string-width and truncate-string-to-width to measure the length and truncate alt text.
parent 015eea59
2010-11-04 Katsumi Yamaoka <yamaoka@jpl.org>
* shr.el (shr-tag-img): Use string-width and truncate-string-to-width
to measure the length and truncate alt text.
2010-11-03 Glenn Morris <rgm@gnu.org>
 
* nndiary.el (nndiary-generate-nov-databases-1)
......
......@@ -551,8 +551,8 @@ Return a string with image data."
(string-match shr-blocked-images url)))
(setq shr-start (point))
(let ((shr-state 'space))
(if (> (length alt) 8)
(shr-insert (substring alt 0 8))
(if (> (string-width alt) 8)
(shr-insert (truncate-string-to-width alt 8))
(shr-insert alt))))
((url-is-cached (shr-encode-url url))
(shr-put-image (shr-get-image-data url) alt))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment