From 0fcd27ec3180a92fe47ad01ab67f58b2ae004ef4 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Fri, 14 Jul 2017 11:50:43 +0000 Subject: [PATCH] Emoji: Fix some failing unit tests in PHP 5.2 and 5.3. - Older versions of PHP don't know how to `html_entity_decode()` emoji. - The fall back regex was a little too broad, catching characters that aren't emoji. See #35293. Built from https://develop.svn.wordpress.org/trunk@41045 git-svn-id: http://core.svn.wordpress.org/trunk@40895 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 4 +--- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 5ef5415df7..fd01b551bb 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -5290,9 +5290,7 @@ function wp_emoji_regex( $type = 'codepoints' ) { // If we're using a PCRE version that doesn't support Unicode, return a loose match regex. if ( 'codepoints' === $type && ( ! defined( 'PCRE_VERSION' ) || version_compare( PCRE_VERSION, '8.32', '<=' ) ) ) { return '/( - \xE2\x98[\x80-\xFF] # Symbols - | \xE2\x99[\x00-\xFF] - | [\xE3-\xED][\x00-\xFF]{2} + \xE2\x99[\x80-\x82] # Male and female symbols | [\x23\x30-\x39]\xE2\x83\xA3 # Digits | \xF0\x9F[\x85-\x88][\xA6-\xBF] # Enclosed characters | \xF0\x9F[\x8C-\x97][\x80-\xBF] # Misc diff --git a/wp-includes/version.php b/wp-includes/version.php index 443676c355..c5f945efe4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41043'; +$wp_version = '4.9-alpha-41045'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.