Ticket #14148: 14148.3.diff
File 14148.3.diff, 1.1 KB (added by , 7 years ago) |
---|
-
src/wp-includes/media.php
221 221 222 222 // try for a new style intermediate size 223 223 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 ); 225 225 $width = $intermediate['width']; 226 226 $height = $intermediate['height']; 227 227 $is_intermediate = true; … … 228 228 } elseif ( $size == 'thumbnail' ) { 229 229 // fall back to the old thumbnail 230 230 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 ); 232 232 $width = $info[0]; 233 233 $height = $info[1]; 234 234 $is_intermediate = true;