Commit 821107d5 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Ignore invalid SVG images

* shr.el (shr-tag-svg): Ignore SVG images that have no width
or height, because these can't be displayed by ImageMagick,
parent b05471e4
......@@ -1152,7 +1152,9 @@ ones, in case fg and bg are nil."
(defun shr-tag-svg (dom)
(when (and (image-type-available-p 'svg)
(not shr-inhibit-images))
(not shr-inhibit-images)
(dom-attr dom 'width)
(dom-attr dom 'height))
(funcall shr-put-image-function (list (shr-dom-to-xml dom) 'image/svg+xml)
"SVG Image")))
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