Skip to content

Kirby 4.3.0

Svg

Sane handler for SVG files

Allow additional attributes/tags

By default, the sanitizer will strip any attributes or tags that haven't been flagged as allowed in the default lists.

If you have a certain attribute or tag in your SVG files that should not be stripped, you can add those as follows:

// <foo> tag
Kirby\Sane\Svg::$allowedTags[] = 'foo';

// `foo` attribute
Kirby\Sane\Svg::$allowedAttrs[] = 'foo';