It is possible to pass an array with allowed protocols to the esc_url() function. For data-URLs this has to contain the data
scheme, as this is not whitelisted by wp_allowed_protocols() as default.
esc_url( $data_url, array( 'data' ) );
It is possible to pass an array with allowed protocols to the esc_url() function. For data-URLs this has to contain the data
scheme, as this is not whitelisted by wp_allowed_protocols() as default.
esc_url( $data_url, array( 'data' ) );