-
Notifications
You must be signed in to change notification settings - Fork 9
Sanitize Whitelist
SVG-Edit uses whitelist approach when parsing XML. So you might encounter stripped sozi markups when loading SVG not using the Load Sozi-enabled SVG menu, or when Editing Source (hotkey U) while in editor.
To fix this, you need to add sozi attributes to the whitelist for all your desired frame element (usually rect element).
editor/sanitize.js:
Line 30 add:
var sozins = 'http://sozi.baierouge.fr';
Line 40 add:
nsMap_[sozins] = 'sozi';
Line 73 add:
"rect": ["class", "clip-path", "clip-rule", "fill", "fill-opacity", "fill-rule", "filter", "height", "id", "mask", "opacity", "requiredFeatures", "rx", "ry", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "style", "systemLanguage", "transform", "width", "x", "y", "sozi:title", "sozi:sequence", "sozi:hide", "sozi:clip", "sozi:timeout-enable", "sozi:timeout-ms", "sozi:transition-duration-ms", "sozi:transition-zoom-percent", "sozi:transition-profile", "sozi:frameid"],
or just use the sanitize.js from the demo.