Make WordPress Core

Ticket #33279: formatting.php.patch

File formatting.php.patch, 1.8 KB (added by acbaile, 10 years ago)

Removing hard-slyling of height and max-height in html-code for smilies

  • formatting.php

     
    22972297         */
    22982298        $src_url = apply_filters( 'smilies_src', includes_url( "images/smilies/$img" ), $img, site_url() );
    22992299
    2300         return sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="height: 1em; max-height: 1em;" />', esc_url( $src_url ), esc_attr( $smiley ) );
     2300        return sprintf( '<img src="%s" alt="%s" class="wp-smiley" />', esc_url( $src_url ), esc_attr( $smiley ) );
    23012301}
    23022302
    23032303/**
     
    43154315        $printed = true;
    43164316?>
    43174317<style type="text/css">
    4318 img.wp-smiley,
    43194318img.emoji {
    43204319        display: inline !important;
    43214320        border: none !important;
     
    45024501                                                $chars = str_replace( array( '&#x', ';'), '', $flag );
    45034502
    45044503                                                list( $char1, $char2 ) = str_split( $chars, 5 );
    4505                                                 $entity = sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="height: 1em; max-height: 1em;" />', $cdn_url . $char1 . '-' . $char2 . $ext, html_entity_decode( $flag ) );
     4504                                                $entity = sprintf( '<img src="%s" alt="%s" class="wp-smiley" />', $cdn_url . $char1 . '-' . $char2 . $ext, html_entity_decode( $flag ) );
    45064505
    45074506                                                $content = str_replace( $flag, $entity, $content );
    45084507                                        }
     
    45174516                                if ( ! empty( $matches[1] ) ) {
    45184517                                        foreach ( $matches[1] as $emoji ) {
    45194518                                                $char = str_replace( array( '&#x', ';'), '', $emoji );
    4520                                                 $entity = sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="height: 1em; max-height: 1em;" />', $cdn_url . $char . $ext, html_entity_decode( $emoji ) );
     4519                                                $entity = sprintf( '<img src="%s" alt="%s" class="wp-smiley" />', $cdn_url . $char . $ext, html_entity_decode( $emoji ) );
    45214520
    45224521                                                $content = str_replace( $emoji, $entity, $content );
    45234522                                        }