10up/safe-svg

It would be beneficial if you could use `safe-svg` for `wp_kses` and other similar purposes.

saas786 opened this issue · 2 comments

Is your enhancement related to a problem? Please describe.

I am using svg in my widget (custom HTML block) and sanitizing the content with wp_kses. However, it strips down the svg markup.

It would be nice if safe-svg could provide a helper function for such use cases. It wouldn't necessarily need to hook into wp_kses_allowed_html, but it would be helpful if I could use the sane defaults provided by this plugin.

wp_kses( $input, \enshrined\svgSanitize\Sanitizer\kses_extended_ruleset() ) or such would be the use.

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct