WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/27/2015 02:11:45 AM (6 years ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r31881 r31909  
    21102110    $src_url = apply_filters( 'smilies_src', includes_url( "images/smilies/$img" ), $img, site_url() );
    21112111
    2112     return sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="max-height: 1em;" />', esc_url( $src_url ), esc_attr( $smiley ) );
     2112    return sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="height: 1em; max-height: 1em;" />', esc_url( $src_url ), esc_attr( $smiley ) );
    21132113}
    21142114
     
    42764276
    42774277                        list( $char1, $char2 ) = str_split( $chars, 5 );
    4278                         $entity = '<img src="' . $cdn_url . $char1 . '-' . $char2 . $ext . '" class="wp-smiley" style="max-height: 1em;" />';
     4278                        $entity = '<img src="' . $cdn_url . $char1 . '-' . $char2 . $ext . '" class="wp-smiley" style="height: 1em; max-height: 1em;" />';
    42794279
    42804280                        $content = str_replace( $flag, $entity, $content );
     
    42914291                    foreach ( $matches[1] as $emoji ) {
    42924292                        $char = str_replace( array( '&#x', ';'), '', $emoji );
    4293                         $entity = '<img src="' . $cdn_url . $char . $ext . '" class="wp-smiley" style="max-height: 1em;" />';
     4293                        $entity = '<img src="' . $cdn_url . $char . $ext . '" class="wp-smiley" style="height: 1em; max-height: 1em;" />';
    42944294
    42954295                        $content = str_replace( $emoji, $entity, $content );
Note: See TracChangeset for help on using the changeset viewer.