From 3d8a61bc798a1fecd25a615e0fe0731c6478c0f4 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 27 Feb 2014 00:04:45 +0000 Subject: [PATCH] Unslash in the time-format and date-format ajax endpoints. props GregLone. fixes #27216. git-svn-id: https://develop.svn.wordpress.org/trunk@27305 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ajax-actions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index caf6311168..16cb7642e8 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -1713,11 +1713,11 @@ function wp_ajax_set_post_thumbnail() { } function wp_ajax_date_format() { - wp_die( date_i18n( sanitize_option( 'date_format', $_POST['date'] ) ) ); + wp_die( date_i18n( sanitize_option( 'date_format', wp_unslash( $_POST['date'] ) ) ) ); } function wp_ajax_time_format() { - wp_die( date_i18n( sanitize_option( 'time_format', $_POST['date'] ) ) ); + wp_die( date_i18n( sanitize_option( 'time_format', wp_unslash( $_POST['date'] ) ) ) ); } function wp_ajax_wp_fullscreen_save_post() {