diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 27e514f064..4ab8d11e24 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -5113,7 +5113,11 @@ function wp_encode_emoji( $content ) { $emoji = _wp_emoji_list( 'partials' ); foreach ( $emoji as $emojum ) { - $emoji_char = html_entity_decode( $emojum ); + if ( version_compare( phpversion(), '5.4', '<' ) ) { + $emoji_char = html_entity_decode( $emojum, ENT_COMPAT, 'UTF-8' ); + } else { + $emoji_char = html_entity_decode( $emojum ); + } if ( false !== strpos( $content, $emoji_char ) ) { $content = preg_replace( "/$emoji_char/", $emojum, $content ); } @@ -5151,7 +5155,11 @@ function wp_staticize_emoji( $text ) { $possible_emoji = array(); foreach( $emoji as $emojum ) { if ( false !== strpos( $text, $emojum ) ) { - $possible_emoji[ $emojum ] = html_entity_decode( $emojum ); + if ( version_compare( phpversion(), '5.4', '<' ) ) { + $possible_emoji[ $emojum ] = html_entity_decode( $emojum, ENT_COMPAT, 'UTF-8' ); + } else { + $possible_emoji[ $emojum ] = html_entity_decode( $emojum ); + } } } diff --git a/wp-includes/version.php b/wp-includes/version.php index a69dac6e71..8170df25ab 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41701'; +$wp_version = '4.9-alpha-41702'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.