WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/03/2013 09:11:40 PM (8 years ago)
Author:
ryan
Message:

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

see #21767

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/taxonomy.php

    r23554 r23594  
    960960    } else if ( 'name' == $field ) {
    961961        // Assume already escaped
    962         $value = stripslashes($value);
     962        $value = wp_unslash($value);
    963963        $field = 't.name';
    964964    } else {
     
    15001500    }
    15011501
    1502     $term = trim( stripslashes( $term ) );
     1502    $term = trim( wp_unslash( $term ) );
    15031503
    15041504    if ( '' === $slug = sanitize_title($term) )
     
    20632063
    20642064    // expected_slashed ($name)
    2065     $name = stripslashes($name);
    2066     $description = stripslashes($description);
     2065    $name = wp_unslash($name);
     2066    $description = wp_unslash($description);
    20672067
    20682068    if ( empty($slug) )
     
    24462446
    24472447    // Escape data pulled from DB.
    2448     $term = add_magic_quotes($term);
     2448    $term = wp_slash($term);
    24492449
    24502450    // Merge old and new args with new args overwriting old ones.
     
    24572457
    24582458    // expected_slashed ($name)
    2459     $name = stripslashes($name);
    2460     $description = stripslashes($description);
     2459    $name = wp_unslash($name);
     2460    $description = wp_unslash($description);
    24612461
    24622462    if ( '' == trim($name) )
Note: See TracChangeset for help on using the changeset viewer.