Upload SVG error

Kirby 3.5.7

I am aware of this: Allow extending SVG namespaces in Sane by lukasbestle · Pull Request #3457 · getkirby/kirby · GitHub and this Error Uploading Some SVGs in Panel (attribute and namespace errors) · Issue #3424 · getkirby/kirby · GitHub

image

I am getting errors with icons straight from Font Awesome and pretty much any SVG atm. They’re all dangerous? Don’t think so.

tried this, no avail.

Kirby\Sane\Svg::$allowedNamespaces = array_merge(Kirby\Sane\Svg::$allowedNamespaces, [
    'focusable' => true,
]);

I cannot find anything actually helpful on this. there should be some kind of hint in the panel warning that leads to an actual solution.

Cannot force my clients to edit SVG they got from credible sources.

Since focusable is an attribute, you should add it to $allowedAttrs:

https://forum.getkirby.com/t/how-to-define-my-allowlist-for-svg-attributes-k3-6-sane-class/

1 Like