I use this to remove HTML temporary, until a patch is here
add_filter( 'acf/load_field/type=select', function( $field ) {
if ( is_array( $field['choices'] ) )
array_walk_recursive( $field['choices'], function( &$value, $key ) {
$value = wp_strip_all_tags( $value );
} );
return $field;
} );
Same problem here. Didn’t find a filter or anything to avoid escaping HTML inside Select2 fields. But there’s another thread with an answer from a developer:
https://support.advancedcustomfields.com/forums/topic/wp_kses-breaks-select-images/
Did you try to load the json manually with the acf/settings/load_json
filter?
// Load ACF JSON for sync
add_filter( 'acf/settings/load_json', function( $paths ) use ( $acf_path ) {
// remove original path (optional)
unset( $paths[0] );
// append path
$paths[] = $acf_path;
// return
return $paths;
} );