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
This commit is contained in:
Gary Pendergast 2017-07-14 11:50:43 +00:00
parent b13bab3e53
commit 0fcd27ec31
2 changed files with 2 additions and 4 deletions

View File

@ -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

View File

@ -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.