From 89304a579fef6e20ca05d49780b49ced709cd599 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 15 Jun 2016 17:44:45 +0000 Subject: [PATCH] I18N: Adjust the regex in `wp_maybe_decline_date()` to handle word boundaries correctly. Props semil. Fixes #36790. git-svn-id: https://develop.svn.wordpress.org/trunk@37717 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 497d264a89..f0e91851cb 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -186,7 +186,7 @@ function wp_maybe_decline_date( $date ) { $months = $wp_locale->month; foreach ( $months as $key => $month ) { - $months[ $key ] = '#' . $month . '#'; + $months[ $key ] = '#\b' . $month . '\b#u'; } $date = preg_replace( $months, $wp_locale->month_genitive, $date );