GNU bug report logs - #40010
27.0.90; fix: Specify xlink namespace for svg images

Previous Next

Package: emacs;

Reported by: Zhu Zihao <all_but_last <at> 163.com>

Date: Tue, 10 Mar 2020 11:56:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 27.0.90

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40010 in the body.
You can then email your comments to 40010 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#40010; Package emacs. (Tue, 10 Mar 2020 11:56:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Zhu Zihao <all_but_last <at> 163.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 10 Mar 2020 11:56:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Zhu Zihao <all_but_last <at> 163.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.90; fix: Specify xlink namespace for svg images
Date: Tue, 10 Mar 2020 19:55:04 +0800
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 <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







Added tag(s) patch. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 20 Mar 2020 08:46:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40010; Package emacs. (Fri, 20 Mar 2020 15:38:02 GMT) Full text and rfc822 format available.

Message #10 received at 40010 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Zhu Zihao <all_but_last <at> 163.com>
Cc: 40010 <at> debbugs.gnu.org
Subject: Re: bug#40010: 27.0.90; fix: Specify xlink namespace for svg images
Date: Fri, 20 Mar 2020 16:37:01 +0100
Zhu Zihao <all_but_last <at> 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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 20 Mar 2020 15:38:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 40010 <at> debbugs.gnu.org and Zhu Zihao <all_but_last <at> 163.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 20 Mar 2020 15:38:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 18 Apr 2020 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 66 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.