diff options
| author | Lars Ingebrigtsen | 2015-12-24 14:40:16 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2015-12-24 14:40:16 +0100 |
| commit | 821107d53c2e390240d25c036b99ebbf9b4a93b6 (patch) | |
| tree | 15f96104bc6f76cc09841422a93ba9f3eacf7027 /lisp/net | |
| parent | b05471e42c17e02c56c87d7599ada0c124a5fe09 (diff) | |
| download | emacs-821107d53c2e390240d25c036b99ebbf9b4a93b6.tar.gz emacs-821107d53c2e390240d25c036b99ebbf9b4a93b6.zip | |
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,
anyway.
Diffstat (limited to 'lisp/net')
| -rw-r--r-- | lisp/net/shr.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index dbf45b885da..d51b8c73d10 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -1152,7 +1152,9 @@ ones, in case fg and bg are nil." | |||
| 1152 | 1152 | ||
| 1153 | (defun shr-tag-svg (dom) | 1153 | (defun shr-tag-svg (dom) |
| 1154 | (when (and (image-type-available-p 'svg) | 1154 | (when (and (image-type-available-p 'svg) |
| 1155 | (not shr-inhibit-images)) | 1155 | (not shr-inhibit-images) |
| 1156 | (dom-attr dom 'width) | ||
| 1157 | (dom-attr dom 'height)) | ||
| 1156 | (funcall shr-put-image-function (list (shr-dom-to-xml dom) 'image/svg+xml) | 1158 | (funcall shr-put-image-function (list (shr-dom-to-xml dom) 'image/svg+xml) |
| 1157 | "SVG Image"))) | 1159 | "SVG Image"))) |
| 1158 | 1160 | ||