Closed stefankempf closed 4 months ago
You have a class
on the svg itself, and a class
on the svg tag. When it gets sanitized, it must be getting confused.
You can either delete the classes off the svg, or add sanitize="false"
to the tag.
You have a
class
on the svg itself, and aclass
on the svg tag. When it gets sanitized, it must be getting confused.You can either delete the classes off the svg, or add
sanitize="false"
to the tag.
It looks like we now have to use sanitize="false"
to also add other attributes even if they're not in the svg file. For example I often include role="img"
on svgs for accessibility reasons, that only works with sanitize="false"
even though role isn't in the svg.
You can disable svg sanitization completely by adding \Statamic\Tags\Svg::disableSanitization();
to your AppServiceProvider
's boot
method.
Bug description
I have a pretty basic svg tag setup
while
resources/svg/close.svg
looks like thatin the frontend, the svg tag is not getting outputed, the button is empty.
sanitize="false"
resolves the issue,{{ svg:close
or{{ svg :src="close"
does notHow to reproduce
follow above explained setup
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response