WordPress.org

Make WordPress Core

Ticket #14148: 14148.2.diff

File 14148.2.diff, 1.4 KB (added by Mte90, 3 years ago)

refresh patch

  • src/wp-includes/media.php

     
    223223
    224224        // try for a new style intermediate size
    225225        if ( $intermediate = image_get_intermediate_size($id, $size) ) {
    226                 $img_url = str_replace($img_url_basename, $intermediate['file'], $img_url);
     226                $img_url = str_replace($img_url_basename, urlencode( $intermediate['file'] ), $img_url);
    227227                $width = $intermediate['width'];
    228228                $height = $intermediate['height'];
    229229                $is_intermediate = true;
     
    231231        elseif ( $size == 'thumbnail' ) {
    232232                // fall back to the old thumbnail
    233233                if ( ($thumb_file = wp_get_attachment_thumb_file($id)) && $info = getimagesize($thumb_file) ) {
    234                         $img_url = str_replace($img_url_basename, wp_basename($thumb_file), $img_url);
     234                        $img_url = str_replace($img_url_basename, urlencode( wp_basename($thumb_file) ), $img_url);
    235235                        $width = $info[0];
    236236                        $height = $info[1];
    237237                        $is_intermediate = true;
  • src/wp-includes/post.php

     
    50475047                        }
    50485048                }
    50495049        }
     5050        $url = urlencode( $url );
    50505051
    50515052        /*
    50525053         * If any of the above options failed, Fallback on the GUID as used pre-2.7,