From: Visuwesh Date: Mon, 11 Dec 2023 11:39:03 +0000 (+0530) Subject: Fix 'shr-put-image' with nil value for ALT X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=745ec75677b3768f9adc436303f3886b88f6f569;p=emacs.git Fix 'shr-put-image' with nil value for ALT * lisp/net/shr.el (shr-put-image): Account for nil value for ALT. (Bug#67764) --- diff --git a/lisp/net/shr.el b/lisp/net/shr.el index e0888c61496..8a24a4f6696 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1137,7 +1137,9 @@ element is the data blob and the second element is the content-type." (when image ;; The trailing space can confuse shr-insert into not ;; putting any space after inline images. - (setq alt (string-trim alt)) + ;; ALT may be nil when visiting image URLs in eww + ;; (bug#67764). + (setq alt (if alt (string-trim alt) "*")) ;; When inserting big-ish pictures, put them at the ;; beginning of the line. (let ((inline (shr--inline-image-p image)))