emacs-diffs
[Top][All Lists]
Advanced

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

emacs-27 4860530: Don't add repeated xlmns:xlink declarations in svg-cre


From: Lars Ingebrigtsen
Subject: emacs-27 4860530: Don't add repeated xlmns:xlink declarations in svg-create
Date: Tue, 24 Mar 2020 00:31:35 -0400 (EDT)

branch: emacs-27
commit 4860530f3c130c6f854ea83dcc03f59e535a33ba
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Don't add repeated xlmns:xlink declarations in svg-create
    
    * lisp/svg.el (svg-create): Fix previous unconditional addition of
    the xmlns:xlink declaration -- callers may already add one, and
    having it twice is something most svg libraries doesn't like.
---
 lisp/svg.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/svg.el b/lisp/svg.el
index 370c9c0..7aadbc2 100644
--- a/lisp/svg.el
+++ b/lisp/svg.el
@@ -70,7 +70,8 @@ any further elements added."
              (height . ,height)
              (version . "1.1")
              (xmlns . "http://www.w3.org/2000/svg";)
-              (xmlns:xlink . "http://www.w3.org/1999/xlink";)
+              ,@(unless (plist-get args :xmlns:xlink)
+                  '((xmlns:xlink . "http://www.w3.org/1999/xlink";)))
               ,@(svg--arguments nil args))))
 
 (defun svg-gradient (svg id type stops)



reply via email to

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