diff --git a/editor/sanitize.js b/editor/sanitize.js index dcd9aaa0..5924a598 100644 --- a/editor/sanitize.js +++ b/editor/sanitize.js @@ -50,6 +50,7 @@ var svgWhiteList_ = { "circle": ["class", "clip-path", "clip-rule", "cx", "cy", "fill", "fill-opacity", "fill-rule", "filter", "id", "mask", "opacity", "r", "requiredFeatures", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "style", "systemLanguage", "transform"], "clipPath": ["class", "clipPathUnits", "id"], "defs": [], + "style" : ["type"], "desc": [], "ellipse": ["class", "clip-path", "clip-rule", "cx", "cy", "fill", "fill-opacity", "fill-rule", "filter", "id", "mask", "opacity", "requiredFeatures", "rx", "ry", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "style", "systemLanguage", "transform"], "feGaussianBlur": ["class", "color-interpolation-filters", "id", "requiredFeatures", "stdDeviation"], diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 22643f76..68a3343e 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -5734,7 +5734,13 @@ this.setSvgString = function(xmlString) { batchCmd.addSubCommand(new RemoveElementCommand(oldzoom, nextSibling, svgroot)); // set new svg document - svgcontent = svgroot.appendChild(svgdoc.importNode(newDoc.documentElement, true)); + var _tmpDoc = newDoc.documentElement; + //TODO: remove isChrome() blocks when importNode is fixed + //Issue: https://code.google.com/p/chromium/issues/detail?id=57871 + if(svgedit.browser.isChrome()) { + _tmpDoc = $(newDoc.documentElement).clone(true)[0]; + } + svgcontent = svgroot.appendChild(_tmpDoc); var content = $(svgcontent);