From 5bfa878fee2ae9128376fc5dee71fc7a20937a1e Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Mon, 28 Sep 2015 19:26:25 +0000 Subject: [PATCH] Correctly slash post fields when trashing and untrashing posts. Fixes #27550 Props dmenard, Denis-de-Bernardy Built from https://develop.svn.wordpress.org/trunk@34668 git-svn-id: http://core.svn.wordpress.org/trunk@34632 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-functions.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/post-functions.php b/wp-includes/post-functions.php index 47db1dfcec..cbe464f967 100644 --- a/wp-includes/post-functions.php +++ b/wp-includes/post-functions.php @@ -2518,7 +2518,7 @@ function wp_trash_post( $post_id = 0 ) { add_post_meta($post_id,'_wp_trash_meta_time', time()); $post['post_status'] = 'trash'; - wp_insert_post($post); + wp_insert_post( wp_slash( $post ) ); wp_trash_post_comments($post_id); @@ -2565,7 +2565,7 @@ function wp_untrash_post( $post_id = 0 ) { delete_post_meta($post_id, '_wp_trash_meta_status'); delete_post_meta($post_id, '_wp_trash_meta_time'); - wp_insert_post($post); + wp_insert_post( wp_slash( $post ) ); wp_untrash_post_comments($post_id); diff --git a/wp-includes/version.php b/wp-includes/version.php index 2320820e73..73407b91b9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34667'; +$wp_version = '4.4-alpha-34668'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.