]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix problem with emacs -nw / eww / svg
authorRobert Pluim <rpluim@gmail.com>
Tue, 24 Dec 2019 16:21:06 +0000 (17:21 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 24 Dec 2019 16:21:06 +0000 (17:21 +0100)
* lisp/net/shr.el (shr-parse-image-data): Don't bug out on
non-visual Emacs versions on SVG images (bug#38507).

lisp/net/shr.el

index 22d4cde34a756eb8734d6e9a5b21b9ebed208c52..97f8bed88c1051a1f58a26e12f045e29005f4057 100644 (file)
@@ -1197,7 +1197,8 @@ Return a string with image data."
             (libxml-parse-xml-region (point) (point-max)) 'utf-8)))
     ;; SVG images often do not have a specified foreground/background
     ;; color, so wrap them in styles.
-    (when (eq content-type 'image/svg+xml)
+    (when (and (display-images-p)
+               (eq content-type 'image/svg+xml))
       (setq data (svg--wrap-svg data)))
     (list data content-type)))