From 4e06f0ad40da2ccd492d668d5121f3626caeee51 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 22 Oct 2019 17:31:08 +0000 Subject: [PATCH] Date/Time: Make sure `wp_date()` does not unnecessarily escape localized numbers, but keeps localized slashes. Props Rarst, tmatsuur, remcotolsma, peterwilsoncc. Reviewed by peterwilsoncc. Fixes #48319. Built from https://develop.svn.wordpress.org/trunk@46569 git-svn-id: http://core.svn.wordpress.org/trunk@46366 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 12 ++++++------ wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 7db3bbafd9..f8255dd262 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -254,22 +254,22 @@ function wp_date( $format, $timestamp = null, $timezone = null ) { for ( $i = 0; $i < $format_length; $i ++ ) { switch ( $format[ $i ] ) { case 'D': - $new_format .= backslashit( $wp_locale->get_weekday_abbrev( $weekday ) ); + $new_format .= addcslashes( $wp_locale->get_weekday_abbrev( $weekday ), '\\A..Za..z' ); break; case 'F': - $new_format .= backslashit( $month ); + $new_format .= addcslashes( $month, '\\A..Za..z' ); break; case 'l': - $new_format .= backslashit( $weekday ); + $new_format .= addcslashes( $weekday, '\\A..Za..z' ); break; case 'M': - $new_format .= backslashit( $wp_locale->get_month_abbrev( $month ) ); + $new_format .= addcslashes( $wp_locale->get_month_abbrev( $month ), '\\A..Za..z' ); break; case 'a': - $new_format .= backslashit( $wp_locale->get_meridiem( $datetime->format( 'a' ) ) ); + $new_format .= addcslashes( $wp_locale->get_meridiem( $datetime->format( 'a' ) ), '\\A..Za..z' ); break; case 'A': - $new_format .= backslashit( $wp_locale->get_meridiem( $datetime->format( 'A' ) ) ); + $new_format .= addcslashes( $wp_locale->get_meridiem( $datetime->format( 'A' ) ), '\\A..Za..z' ); break; case '\\': $new_format .= $format[ $i ]; diff --git a/wp-includes/version.php b/wp-includes/version.php index 25d503061c..de8bcab22e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-RC1-46568'; +$wp_version = '5.3-RC1-46569'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.