Make WordPress Core

Ticket #31719: 31719-3.patch

File 31719-3.patch, 1.6 KB (added by janhenckens, 10 years ago)
  • src/wp-includes/formatting.php

    diff --git src/wp-includes/formatting.php src/wp-includes/formatting.php
    index 0377bbd..f14ef86 100644
    function translate_smiley( $matches ) { 
    21092109         */
    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="height: 1em;" />', esc_url( $src_url ), esc_attr( $smiley ) );
     2112        return sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="max-height: 1em;" />', esc_url( $src_url ), esc_attr( $smiley ) );
    21132113}
    21142114
    21152115/**
    function wp_staticize_emoji( $text ) { 
    42004200                                                $chars = str_replace( array( '&#x', ';'), '', $flag );
    42014201
    42024202                                                list( $char1, $char2 ) = str_split( $chars, 5 );
    4203                                                 $entity = '<img src="' . $cdn_url . $char1 . '-' . $char2 . $ext . '" class="wp-smiley" style="height: 1em;" />';
     4203                                                $entity = '<img src="' . $cdn_url . $char1 . '-' . $char2 . $ext . '" class="wp-smiley" style="max-height: 1em;" />';
    42044204
    42054205                                                $content = str_replace( $flag, $entity, $content );
    42064206                                        }
    function wp_staticize_emoji( $text ) { 
    42154215                                if ( ! empty( $matches[1] ) ) {
    42164216                                        foreach ( $matches[1] as $emoji ) {
    42174217                                                $char = str_replace( array( '&#x', ';'), '', $emoji );
    4218                                                 $entity = '<img src="' . $cdn_url . $char . $ext . '" class="wp-smiley" style="height: 1em;" />';
     4218                                                $entity = '<img src="' . $cdn_url . $char . $ext . '" class="wp-smiley" style="max-height: 1em;" />';
    42194219
    42204220                                                $content = str_replace( $emoji, $entity, $content );
    42214221                                        }