From 6caa7ba82f700477cc5f23af6aafd1f5de758a5b Mon Sep 17 00:00:00 2001 From: Ben Marshall Date: Thu, 20 Jul 2023 14:59:39 -0500 Subject: [PATCH] feat(kses_allowed_html): updated the documentation --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index fb41a314..16fd7bf4 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,14 @@ add_filter( 'svg_allowed_tags', function ( $tags ) { } ); ``` +### Can `wp_kses` be used with a helper to sanitize an SVG? + +Indeed, you can accomplish this with `\SafeSvg\SafeSvgTags\safe_svg_tags::kses_allowed_html()`: + +```php +echo wp_kses('', \SafeSvg\SafeSvgTags\safe_svg_tags::kses_allowed_html()) +``` + ## Support Level **Stable:** 10up is not planning to develop any new features for this, but will still respond to bug reports and security concerns. We welcome PRs, but any that include new features should be small and easy to integrate and should not include breaking changes. We otherwise intend to keep this tested up to the most recent version of WordPress.