Make WordPress Core


Ignore:
Timestamp:
03/01/2013 05:14:09 PM (12 years ago)
Author:
ryan
Message:

Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/network/site-settings.php

    r23554 r23567  
    5454    $skip_options = array( 'allowedthemes' ); // Don't update these options since they are handled elsewhere in the form.
    5555    foreach ( (array) $_POST['option'] as $key => $val ) {
     56        $key = wp_unslash( $key );
     57        $val = wp_unslash( $val );
    5658        if ( $key === 0 || is_array( $val ) || in_array($key, $skip_options) )
    5759            continue; // Avoids "0 is a protected WP option and may not be modified" error when edit blog options
    5860        if ( $c == $count )
    59             update_option( $key, stripslashes( $val ) );
     61            update_option( $key, $val );
    6062        else
    61             update_option( $key, stripslashes( $val ), false ); // no need to refresh blog details yet
     63            update_option( $key, $val, false ); // no need to refresh blog details yet
    6264        $c++;
    6365    }
Note: See TracChangeset for help on using the changeset viewer.