From 28020bc2e2e6d40eed6703be89c68aa46be669db Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Fri, 14 Aug 2009 22:36:54 +0000 Subject: [PATCH] White list for transform attribute. White list radialGradient. White list gradientTransform, gradientUnits, spreadMethod attributes for gradients. git-svn-id: http://svg-edit.googlecode.com/svn/trunk@382 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 310b1f2f..5cf30faf 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -7,17 +7,18 @@ if(!window.console) { // this defines which elements and attributes that we support var svgWhiteList = { - "circle": ["cx", "cy", "fill", "fill-opacity", "id", "stroke", "r", "stroke-opacity", "stroke-width", "stroke-dasharray"], + "circle": ["cx", "cy", "fill", "fill-opacity", "id", "stroke", "r", "stroke-opacity", "stroke-width", "stroke-dasharray", "transform"], "defs": [], - "ellipse": ["cx", "cy", "fill", "fill-opacity", "id", "stroke", "rx", "ry", "stroke-opacity", "stroke-width", "stroke-dasharray"], - "line": ["fill", "fill-opacity", "id", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray", "x1", "x2", "y1", "y2"], - "linearGradient": ["id", "x1", "x2", "y1", "y2"], - "path": ["d", "fill", "fill-opacity", "id", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray"], - "polyline": ["id", "points", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray"], - "rect": ["fill", "fill-opacity", "height", "id", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray", "width", "x", "y"], + "ellipse": ["cx", "cy", "fill", "fill-opacity", "id", "stroke", "rx", "ry", "stroke-opacity", "stroke-width", "stroke-dasharray", "transform"], + "line": ["fill", "fill-opacity", "id", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray", "transform", "x1", "x2", "y1", "y2"], + "linearGradient": ["id", "gradientTransform", "gradientUnits", "spreadMethod", "x1", "x2", "y1", "y2"], + "path": ["d", "fill", "fill-opacity", "id", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray", "transform"], + "polyline": ["id", "points", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray", "transform"], + "radialGradient": ["id", "cx", "cy", "fx", "fy", "gradientTransform", "gradientUnits", "r", "spreadMethod"], + "rect": ["fill", "fill-opacity", "height", "id", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray", "transform", "width", "x", "y"], "stop": ["id", "offset", "stop-color", "stop-opacity"], - "svg": ["id", "height", "width", "xmlns"], - "text": ["font-family", "font-size", "font-style", "font-weight", "id", "x", "y"], + "svg": ["id", "height", "transform", "width", "xmlns"], + "text": ["font-family", "font-size", "font-style", "font-weight", "id", "transform", "x", "y"], };