emacs-devel
[Top][All Lists]
Advanced

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

[PATCH]: Add xmlns:link namespace for svg-create


From: Zhu Zihao
Subject: [PATCH]: Add xmlns:link namespace for svg-create
Date: Fri, 20 Mar 2020 16:01:49 +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)

After update my librsvg from 2.46.4 to 2.48.0. Emacs failed to render the svg
image with image embbed generated by svg-create in svg.el.

An example SVG is here: https://pastebin.com/9QnuMy7Y

The reason is svg.el use xmlns:xlink but fails to specify namespace for it. So
new version librsvg reject this SVG.

I've submitted this bug to issue tracker a week before but no reply, so I post
it here again

~~~

From 93188f91906dea87bfbf62e18b608bbd2f84c7af Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last <at> 163.com>
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]