Emoji: [31864] changed emoji image's inline style from height to max-height. Unfortunately, anything using feedparser.py (for example, NewsBlur) strips out max-height, which gives us massive emoji in feeds.

This re-adds `height`, and also reminds us why we can't have nice things.

See #31719.


Built from https://develop.svn.wordpress.org/trunk@31909


git-svn-id: http://core.svn.wordpress.org/trunk@31888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2015-03-27 02:12:28 +00:00
parent 321b551650
commit bfb9990548
2 changed files with 4 additions and 4 deletions

View File

@ -2109,7 +2109,7 @@ function translate_smiley( $matches ) {
*/ */
$src_url = apply_filters( 'smilies_src', includes_url( "images/smilies/$img" ), $img, site_url() ); $src_url = apply_filters( 'smilies_src', includes_url( "images/smilies/$img" ), $img, site_url() );
return sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="max-height: 1em;" />', esc_url( $src_url ), esc_attr( $smiley ) ); return sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="height: 1em; max-height: 1em;" />', esc_url( $src_url ), esc_attr( $smiley ) );
} }
/** /**
@ -4275,7 +4275,7 @@ function wp_staticize_emoji( $text ) {
$chars = str_replace( array( '&#x', ';'), '', $flag ); $chars = str_replace( array( '&#x', ';'), '', $flag );
list( $char1, $char2 ) = str_split( $chars, 5 ); list( $char1, $char2 ) = str_split( $chars, 5 );
$entity = '<img src="' . $cdn_url . $char1 . '-' . $char2 . $ext . '" class="wp-smiley" style="max-height: 1em;" />'; $entity = '<img src="' . $cdn_url . $char1 . '-' . $char2 . $ext . '" class="wp-smiley" style="height: 1em; max-height: 1em;" />';
$content = str_replace( $flag, $entity, $content ); $content = str_replace( $flag, $entity, $content );
} }
@ -4290,7 +4290,7 @@ function wp_staticize_emoji( $text ) {
if ( ! empty( $matches[1] ) ) { if ( ! empty( $matches[1] ) ) {
foreach ( $matches[1] as $emoji ) { foreach ( $matches[1] as $emoji ) {
$char = str_replace( array( '&#x', ';'), '', $emoji ); $char = str_replace( array( '&#x', ';'), '', $emoji );
$entity = '<img src="' . $cdn_url . $char . $ext . '" class="wp-smiley" style="max-height: 1em;" />'; $entity = '<img src="' . $cdn_url . $char . $ext . '" class="wp-smiley" style="height: 1em; max-height: 1em;" />';
$content = str_replace( $emoji, $entity, $content ); $content = str_replace( $emoji, $entity, $content );
} }

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.2-beta3-31908'; $wp_version = '4.2-beta3-31909';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.