wp/wp-trackback.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
    58 $excerpt   = isset( $_POST['excerpt'] ) ? wp_unslash( $_POST['excerpt'] ) : '';
    58 $excerpt   = isset( $_POST['excerpt'] ) ? wp_unslash( $_POST['excerpt'] ) : '';
    59 $blog_name = isset( $_POST['blog_name'] ) ? wp_unslash( $_POST['blog_name'] ) : '';
    59 $blog_name = isset( $_POST['blog_name'] ) ? wp_unslash( $_POST['blog_name'] ) : '';
    60 
    60 
    61 if ( $charset ) {
    61 if ( $charset ) {
    62 	$charset = str_replace( array( ',', ' ' ), '', strtoupper( trim( $charset ) ) );
    62 	$charset = str_replace( array( ',', ' ' ), '', strtoupper( trim( $charset ) ) );
    63 } else {
    63 
       
    64 	// Validate the specified "sender" charset is available on the receiving site.
       
    65 	if ( function_exists( 'mb_list_encodings' ) && ! in_array( $charset, mb_list_encodings(), true ) ) {
       
    66 		$charset = '';
       
    67 	}
       
    68 }
       
    69 
       
    70 if ( ! $charset ) {
    64 	$charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS';
    71 	$charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS';
    65 }
    72 }
    66 
    73 
    67 // No valid uses for UTF-7.
    74 // No valid uses for UTF-7.
    68 if ( str_contains( $charset, 'UTF-7' ) ) {
    75 if ( str_contains( $charset, 'UTF-7' ) ) {