bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40010: 27.0.90; fix: Specify xlink namespace for svg images


From: Zhu Zihao
Subject: bug#40010: 27.0.90; fix: Specify xlink namespace for svg images
Date: Tue, 10 Mar 2020 19:55:04 +0800
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Goj┼Ź) APEL/10.8 EasyPG/1.0.0 Emacs/27.0 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

svg-create in svg.el generates a svg without specifying the namespace of xlink.
This may fails the render of a svg with image embed in.

A SVG example failed to render was provided here: https://pastebin.com/9QnuMy7Y.

IMO this patch can help fix this issue.

~~~~~~~~

From 93188f91906dea87bfbf62e18b608bbd2f84c7af Mon Sep 17 00:00:00 2001
From: Zhu Zihao <address@hidden>
Date: Tue, 10 Mar 2020 19:46:03 +0800
Subject: [PATCH] fix: Specify xlink namespace for svg images.

---
 lisp/svg.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/svg.el b/lisp/svg.el
index 6a2fc4c90fc..370c9c04e76 100644
--- a/lisp/svg.el
+++ b/lisp/svg.el
@@ -70,7 +70,8 @@ svg-create
              (height . ,height)
              (version . "1.1")
              (xmlns . "http://www.w3.org/2000/svg";)
-             ,@(svg--arguments nil args))))
+              (xmlns:xlink . "http://www.w3.org/1999/xlink";)
+              ,@(svg--arguments nil args))))
 
 (defun svg-gradient (svg id type stops)
   "Add a gradient with ID to SVG.
-- 
2.25.1








reply via email to

[Prev in Thread] Current Thread [Next in Thread]