aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Pluim2019-12-24 17:21:06 +0100
committerLars Ingebrigtsen2019-12-24 17:21:06 +0100
commita9fe6dfa90c780d9dcebae6312ab623ad7e5a2bd (patch)
tree8fe88bac0e8f8faa0e542cef3de2dfb68b23fff5
parent0de63092c8ebae3877d97a18fa231c7ca2fbadc0 (diff)
downloademacs-a9fe6dfa90c780d9dcebae6312ab623ad7e5a2bd.tar.gz
emacs-a9fe6dfa90c780d9dcebae6312ab623ad7e5a2bd.zip
Fix problem with emacs -nw / eww / svg
* lisp/net/shr.el (shr-parse-image-data): Don't bug out on non-visual Emacs versions on SVG images (bug#38507).
-rw-r--r--lisp/net/shr.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 22d4cde34a7..97f8bed88c1 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1197,7 +1197,8 @@ Return a string with image data."
1197 (libxml-parse-xml-region (point) (point-max)) 'utf-8))) 1197 (libxml-parse-xml-region (point) (point-max)) 'utf-8)))
1198 ;; SVG images often do not have a specified foreground/background 1198 ;; SVG images often do not have a specified foreground/background
1199 ;; color, so wrap them in styles. 1199 ;; color, so wrap them in styles.
1200 (when (eq content-type 'image/svg+xml) 1200 (when (and (display-images-p)
1201 (eq content-type 'image/svg+xml))
1201 (setq data (svg--wrap-svg data))) 1202 (setq data (svg--wrap-svg data)))
1202 (list data content-type))) 1203 (list data content-type)))
1203 1204