Skip to content

Commit

Permalink
Merge commit from fork
Browse files Browse the repository at this point in the history
Ensure we sanitize svgs on the `wp_handle_sideload_prefilter` filter
  • Loading branch information
dkotter committed Aug 28, 2024
2 parents cec1bc7 + 8fc0837 commit a832fe5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions safe-svg.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public function __construct() {

add_action( 'init', array( $this, 'setup_blocks' ) );
add_filter( 'upload_mimes', array( $this, 'allow_svg' ) );
add_filter( 'wp_handle_sideload_prefilter', array( $this, 'check_for_svg' ) );
add_filter( 'wp_handle_upload_prefilter', array( $this, 'check_for_svg' ) );
add_filter( 'wp_check_filetype_and_ext', array( $this, 'fix_mime_type_svg' ), 75, 4 );
add_filter( 'wp_prepare_attachment_for_js', array( $this, 'fix_admin_preview' ), 10, 3 );
Expand Down

0 comments on commit a832fe5

Please sign in to comment.