mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Emoji: When encoding emoji into HTML entities, 0 was being incorrectly trimmed from the right side of the hex string, causing some characters to be encoded incorrectly.
Built from https://develop.svn.wordpress.org/trunk@31926 git-svn-id: http://core.svn.wordpress.org/trunk@31905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6cd9c9645e
commit
3ddbef69e3
@ -4212,7 +4212,7 @@ function wp_encode_emoji( $content ) {
|
||||
*/
|
||||
$unpacked = unpack( 'H*', mb_convert_encoding( $emoji, 'UTF-32', 'UTF-8' ) );
|
||||
if ( isset( $unpacked[1] ) ) {
|
||||
$entity = '&#x' . trim( $unpacked[1], '0' ) . ';';
|
||||
$entity = '&#x' . ltrim( $unpacked[1], '0' ) . ';';
|
||||
$content = str_replace( $emoji, $entity, $content );
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-beta3-31925';
|
||||
$wp_version = '4.2-beta3-31926';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user