Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/wp-includes/formatting.php

    r18031 r18356  
    24412441                        }
    24422442                        break;
    2443 
     2443                case 'new_admin_email':
     2444                        $value = sanitize_email($value);
     2445                        if ( !is_email($value) ) {
     2446                                $value = get_option( $option ); // Resets option to stored value in the case of failed sanitization
     2447                                if ( function_exists('add_settings_error') )
     2448                                        add_settings_error('new_admin_email', 'invalid_admin_email', __('The email address entered did not appear to be a valid email address. Please enter a valid email address.'));
     2449                        }
     2450                        break;
    24442451                case 'thumbnail_size_w':
    24452452                case 'thumbnail_size_h':
    … …  
    25352542                        }
    25362543                        break;
     2544                case 'WPLANG':
     2545                        $allowed = get_available_languages();
     2546                        if ( ! in_array( $value, $allowed ) && ! empty( $value ) )
     2547                                $value = get_option( $option );
     2548                        break;
    25372549
    25382550                default :
    … …  
    29132925 */
    29142926function sanitize_mime_type( $mime_type ) {
    2915         $sani_mime_type = preg_replace( '/[^-*.a-zA-Z0-9\/]/', '', $mime_type );
     2927        $sani_mime_type = preg_replace( '/[^-+*.a-zA-Z0-9\/]/', '', $mime_type );
    29162928        return apply_filters( 'sanitize_mime_type', $sani_mime_type, $mime_type );
    29172929}
Note: See TracChangeset for help on using the changeset viewer.