Read the following guideline: Troubleshooting and Support | Squidex. I understand that my support request might get deleted if I do not follow the guideline.
Used code blocks with ``` to format my code examples like JSON or logs properly.
I’m submitting a…
Regression (a behavior that stopped working in a new release)
Thanks as well for the nice words. I am not sure if this is a bug or not. The whitelisting has been added to prevent attacks with malicious SVGs. I have to investigate if it is save to allow data-attributes.
Unfortunately I don’t remember the full argumentation. But the problem was security. I have read a view blog posts and recommendations and the general opinion was to have a whitelist instead of a blacklist.
I can probably allow data attributes and enable-background, but I cannot promise that it will be allowed forever, e.g. if I find a security risk, that I am not aware of right now.
In general I would just push your SVG to an optimizer before uploading it or you could also embed it in a text field directly to by pass the problem.
EDIT: What I read so far: data-* is not part of SVG, because SVG is not html. So technically it is correct not to allow it.
You are perhaps right to wonder if the intention to put data- tags on it is to run script things. If you are concerned a user might be able to inject code this way, there are perhaps some frameworks or libraries that could be on a web page that might pick up a data- tag and do something with it, for sure.
I actually had to clean up my SVG files when I uploaded them, too. There were one or more attributes it didn’t like about the ones I had.
Perhaps as developers we might be interested in editing the whitelist ourselves, seeing as how there could be many use cases. Or if it is a security concern, perhaps having different whitelists for different folders, or something like a policy per folder. Maybe we trust our ./assets/ but not our ./uploads/ for instance.
Possibly you seen one of many articles such as this regarding cross-site scripting (XSS) vulnerabilities.