Potential fix for issue 889, importing problems by adding style element to whitelist (patch by asyazwan)
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2057 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
e9cb4c2ce1
commit
0f85c54128
|
@ -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"],
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue