FacetWP – automatically decode HTML entities for Autocomplete facets

<?php
/** modifies html encoded values such as ampersand ( & ) for correct matching in autocomplete facets **/

add_filter( 'facetwp_index_row', function( $params, $class ) {
    if ( 'my_autocomplete' == $params['facet_name'] ) { // change 'my_autocomplete' to name of your facet
        $params['facet_value'] = html_entity_decode( $params['facet_value'] );
        $params['facet_display_value'] = html_entity_decode( $params['facet_display_value'] );
    }
    return $params;
}, 10, 2 );