Changeset 23594 for trunk/wp-includes/post.php
- Timestamp:
- 03/03/2013 09:11:40 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/post.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r23554 r23594 361 361 } 362 362 363 // Stripleading and trailing whitespace363 // ` leading and trailing whitespace 364 364 $main = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $main); 365 365 $extended = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $extended); … … 2798 2798 $data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'guid' ) ); 2799 2799 $data = apply_filters('wp_insert_post_data', $data, $postarr); 2800 $data = stripslashes_deep( $data );2800 $data = wp_unslash( $data ); 2801 2801 $where = array( 'ID' => $post_ID ); 2802 2802 … … 2811 2811 } else { 2812 2812 if ( isset($post_mime_type) ) 2813 $data['post_mime_type'] = stripslashes( $post_mime_type ); // This isn't in the update2813 $data['post_mime_type'] = wp_unslash( $post_mime_type ); // This isn't in the update 2814 2814 // If there is a suggested ID, use it if not already present 2815 2815 if ( !empty($import_id) ) { … … 2905 2905 // non-escaped post was passed 2906 2906 $postarr = get_object_vars($postarr); 2907 $postarr = add_magic_quotes($postarr);2907 $postarr = wp_slash($postarr); 2908 2908 } 2909 2909 … … 2912 2912 2913 2913 // Escape data pulled from DB. 2914 $post = add_magic_quotes($post);2914 $post = wp_slash($post); 2915 2915 2916 2916 // Passed post category list overwrites existing category list if not empty. … … 3258 3258 $new = apply_filters('add_ping', $new); 3259 3259 // expected_slashed ($new) 3260 $new = stripslashes($new);3260 $new = wp_unslash($new); 3261 3261 return $wpdb->update( $wpdb->posts, array( 'pinged' => $new ), array( 'ID' => $post_id ) ); 3262 3262 } … … 3351 3351 foreach( (array) $trackback_urls as $tb_url) { 3352 3352 $tb_url = trim($tb_url); 3353 trackback($tb_url, stripslashes($post_title), $excerpt, $post_id);3353 trackback($tb_url, wp_unslash($post_title), $excerpt, $post_id); 3354 3354 } 3355 3355 } … … 3695 3695 3696 3696 // meta_key and meta_value might be slashed 3697 $meta_key = stripslashes($meta_key);3698 $meta_value = stripslashes($meta_value);3697 $meta_key = wp_unslash($meta_key); 3698 $meta_value = wp_unslash($meta_value); 3699 3699 if ( ! empty( $meta_key ) ) 3700 3700 $where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_key = %s", $meta_key); … … 3966 3966 // expected_slashed (everything!) 3967 3967 $data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'post_mime_type', 'guid' ) ); 3968 $data = stripslashes_deep( $data );3968 $data = wp_unslash( $data ); 3969 3969 3970 3970 if ( $update ) {
Note: See TracChangeset
for help on using the changeset viewer.