diff --git a/modules/select.php b/modules/select.php index b3edca12..7181a75a 100644 --- a/modules/select.php +++ b/modules/select.php @@ -191,10 +191,21 @@ function ( $values, $tag ) { ); foreach ( $values as $field => $field_values ) { + $field_values = array_map( + static function ( $value ) { + return html_entity_decode( + (string) $value, + ENT_QUOTES | ENT_HTML5, + 'UTF-8' + ); + }, + $field_values + ); + $field_values = array_filter( array_unique( $field_values ), - function ( $value ) { - return is_string( $value ) && '' !== $value; + static function ( $value ) { + return '' !== $value; } );