kimoa / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
3 stars 0 forks source link

Custom attributes are not supported #746

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.add some custom properties in the svg file element,but my custom properties 
can not be loaded when load form url

What is the expected output? What do you see instead?
i want access my custom properties,but can no see them in the svg source;

Original issue reported on code.google.com by whut...@gmail.com on 17 Dec 2010 at 1:56

Attachments:

GoogleCodeExporter commented 9 years ago
Yeah, we use a whitelist to only import elements and attributes supported by 
the editor, so custom attributes are not possible by default. This is done for 
security reasons.

If you are hosting the editor yourself, you could edit the svgWhiteList object 
to include the properties. Will that be acceptable?

Original comment by adeve...@gmail.com on 17 Dec 2010 at 8:22

GoogleCodeExporter commented 9 years ago
ok thank u ~

Original comment by whut...@gmail.com on 19 Dec 2010 at 8:03

GoogleCodeExporter commented 9 years ago

Original comment by adeve...@gmail.com on 26 Jan 2011 at 3:53

GoogleCodeExporter commented 9 years ago
I'm facing the same problem but changing the svgWhiteList not helping.

Is there something else I should change?

I added "test" into "text" line in file svgcanvas.js 

...
"text": ["class", "clip-path", "clip-rule", "fill", "fill-opacity", 
"fill-rule", "filter", "font-family", "font-size", "font-style", "font-weight", 
"id", "mask", "opacity", "requiredFeatures", "stroke", "stroke-dasharray", 
"stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", 
"stroke-opacity", "stroke-width", "style", "systemLanguage", "text-anchor", 
"transform", "x", "xml:space", "y", "test"],
...  

But when I open svg file / copy paste svg xml content of the file with 
attribute test on text element it is still being removed.. As its shown at the 
attachments...

Any ideas?

Thanks,

Pavel Krayzel

Original comment by pkray...@gmail.com on 8 Feb 2012 at 12:27

Attachments: