projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8377ca6
)
Don't have shr bug out on degenerate <img> tags
author
Lars Ingebrigtsen
<larsi@gnus.org>
Mon, 11 Jun 2018 18:38:25 +0000
(20:38 +0200)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Mon, 11 Jun 2018 18:38:53 +0000
(20:38 +0200)
* lisp/net/shr.el (shr-tag-img): Protect against contructs like
<img src=" ">.
lisp/net/shr.el
patch
|
blob
|
history
diff --git
a/lisp/net/shr.el
b/lisp/net/shr.el
index 1103a9302423c6c0600251cd5cf077f4195bdbab..edea7cb297c328ef599af6d5c5abb5a7fe00da6a 100644
(file)
--- a/
lisp/net/shr.el
+++ b/
lisp/net/shr.el
@@
-1560,6
+1560,10
@@
The preference is a float determined from `shr-prefer-media-type'."
(when (zerop (length alt))
(setq alt "*"))
(cond
+ ((null url)
+ ;; After further expansion, there turned out to be no valid
+ ;; src in the img after all.
+ )
((or (member (dom-attr dom 'height) '("0" "1"))
(member (dom-attr dom 'width) '("0" "1")))
;; Ignore zero-sized or single-pixel images.