unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40010: 27.0.90; fix: Specify xlink namespace for svg images
@ 2020-03-10 11:55 Zhu Zihao
  2020-03-20 15:37 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Zhu Zihao @ 2020-03-10 11:55 UTC (permalink / raw)
  To: 40010

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 <all_but_last@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








^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#40010: 27.0.90; fix: Specify xlink namespace for svg images
  2020-03-10 11:55 bug#40010: 27.0.90; fix: Specify xlink namespace for svg images Zhu Zihao
@ 2020-03-20 15:37 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-03-20 15:37 UTC (permalink / raw)
  To: Zhu Zihao; +Cc: 40010

Zhu Zihao <all_but_last@163.com> writes:

> 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.

Thanks; applied to Emacs 27.1.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-20 15:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 11:55 bug#40010: 27.0.90; fix: Specify xlink namespace for svg images Zhu Zihao
2020-03-20 15:37 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).