Make WordPress Core

Ticket #14148: 14148.3.diff

File 14148.3.diff, 1.1 KB (added by andizer, 7 years ago)

Fix codestyle issue

  • src/wp-includes/media.php

     
    221221
    222222        // try for a new style intermediate size
    223223        if ( $intermediate = image_get_intermediate_size( $id, $size ) ) {
    224                 $img_url         = str_replace( $img_url_basename, $intermediate['file'], $img_url );
     224                $img_url         = str_replace( $img_url_basename, urlencode( $intermediate['file'] ), $img_url );
    225225                $width           = $intermediate['width'];
    226226                $height          = $intermediate['height'];
    227227                $is_intermediate = true;
     
    228228        } elseif ( $size == 'thumbnail' ) {
    229229                // fall back to the old thumbnail
    230230                if ( ( $thumb_file = wp_get_attachment_thumb_file( $id ) ) && $info = getimagesize( $thumb_file ) ) {
    231                         $img_url         = str_replace( $img_url_basename, wp_basename( $thumb_file ), $img_url );
     231                        $img_url         = str_replace( $img_url_basename, urlencode( wp_basename( $thumb_file ) ), $img_url );
    232232                        $width           = $info[0];
    233233                        $height          = $info[1];
    234234                        $is_intermediate = true;