Make WordPress Core


Ignore:
Timestamp:
09/29/2011 07:37:58 PM (13 years ago)
Author:
nacin
Message:

Pass unslashed values from update_metadata() to add_metadata(). fixes #17343.

File:
1 edited

Legend:

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

    r18789 r18816  
    116116    // expected_slashed ($meta_key)
    117117    $meta_key = stripslashes($meta_key);
     118    $passed_value = $meta_value;
    118119    $meta_value = stripslashes_deep($meta_value);
    119120    $meta_value = sanitize_meta( $meta_key, $meta_value, $meta_type );
     
    124125
    125126    if ( ! $meta_id = $wpdb->get_var( $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_key = %s AND $column = %d", $meta_key, $object_id ) ) )
    126         return add_metadata($meta_type, $object_id, $meta_key, $meta_value);
     127        return add_metadata($meta_type, $object_id, $meta_key, $passed_value);
    127128
    128129    // Compare existing value to new value if no prev value given and the key exists only once.
Note: See TracChangeset for help on using the changeset viewer.