From 2151c8d86b2e2ea27238ac1615998a4b796afaaa Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Sun, 14 Feb 2010 03:16:54 -0600 Subject: [PATCH] More Namespace fun I don't know why they want to mess with this, but it's clearly way more complicated than any benefit I can see it yielding. --- public/svg-edit/editor/svgcanvas.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/public/svg-edit/editor/svgcanvas.js b/public/svg-edit/editor/svgcanvas.js index 7c7d0726..40026255 100644 --- a/public/svg-edit/editor/svgcanvas.js +++ b/public/svg-edit/editor/svgcanvas.js @@ -1523,12 +1523,13 @@ function BatchCommand(text) { // map various namespaces to our fixed namespace prefixes // (the default xmlns attribute itself does not get a prefix) - if(attr.namespaceURI && nsMap[attr.namespaceURI] && nsMap[attr.namespaceURI] != "xmlns") { + if (nsMap[attr.namespaceURI] != "xmlns"|| attr.localName != "xlink") { + if(attr.namespaceURI && nsMap[attr.namespaceURI] && nsMap[attr.namespaceURI] != "xmlns") { out.push(nsMap[attr.namespaceURI]+':'); - } - - out.push(attr.localName); out.push("=\""); - out.push(attrVal); out.push("\""); + } + out.push(attr.localName); out.push("=\""); + out.push(attrVal); out.push("\""); + } } } }