Skip to content

Filter: bricks/svg/allowed_tags

Filters the list of allowed SVG tags during sanitization. This is used by the Bricks SVG sanitizer to ensure that uploaded or rendered SVGs do not contain malicious tags.

  • $tags (array): Array of allowed SVG tags.
add_filter( 'bricks/svg/allowed_tags', function( $tags ) {
// Example: Allow 'foreignObject' tag (use with caution!)
$tags[] = 'foreignObject';
return $tags;
} );