You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have an svg that contains a class, for example, and then you add class="" to the tag, it will throw an error:
DOMDocument::loadXML(): Attribute class redefined in Entity, line: 1
This is only an issue now because svgs are sanitized by default.
Without sanitizing, technically both class attributes get output, but it seems that browsers discard the second one, which is what comes from the file. We should try to apply the same behavior: make the attribute from the tag win.
How to reproduce
<svgclass="foo">...</svg>
{{ svgsrc="foo.svg"class="bar" }}
Logs
No response
Environment
5.0.0-alpha.3
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
None
Additional details
No response
The text was updated successfully, but these errors were encountered:
Bug description
If you have an svg that contains a
class
, for example, and then you addclass=""
to the tag, it will throw an error:This is only an issue now because svgs are sanitized by default.
Without sanitizing, technically both class attributes get output, but it seems that browsers discard the second one, which is what comes from the file. We should try to apply the same behavior: make the attribute from the tag win.
How to reproduce
Logs
No response
Environment
5.0.0-alpha.3
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
None
Additional details
No response
The text was updated successfully, but these errors were encountered: