-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Description
Assume you have following svg
<style>
.cls1 {fill:#1a1a1a}
</style>
<path class="cls1" d="..."/>
The result is that the style is not applied to the path because the class attribute of the path element is removed. The reason is unconditional removing of all class="" attributes in the svg by this line in the Symbol class
.replaceAll("(class=\").*?(\")", "")
I assume the intention was to remove the class attribute of the svg element and not all class attributes.
Originally reported by mawinter69, imported from: loadsymbol removes all class attributes
- assignee: mawinter69
- status: Closed
- priority: Minor
- component(s): core
- resolution: Fixed
- resolved: 2024-05-21T14:13:19+00:00
- votes: 0
- watchers: 1
- imported: 2025-11-24
Raw content of original issue
Assume you have following svg
<svg ...> <defs> <style> .cls1 {fill:#1a1a1a} </style> <path class="cls1" d="..."/> </defs>The result is that the style is not applied to the path because the class attribute of the path element is removed. The reason is unconditional removing of all class="" attributes in the svg by this line in the Symbol class
.replaceAll("(class=\").*?(\")", "")I assume the intention was to remove the class attribute of the svg element and not all class attributes.