diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
index 5ab3cd1913..cf40a22c61 100644
a
|
b
|
function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac |
1376 | 1376 | if ( wp_image_matches_ratio( $image_width, $image_height, $image['width'], $image['height'] ) ) { |
1377 | 1377 | // Add the URL, descriptor, and value to the sources array to be returned. |
1378 | 1378 | $source = array( |
1379 | | 'url' => $image_baseurl . $image['file'], |
| 1379 | 'url' => $image_baseurl . rawurlencode( $image['file'] ), |
1380 | 1380 | 'descriptor' => 'w', |
1381 | 1381 | 'value' => $image['width'], |
1382 | 1382 | ); |
… |
… |
function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac |
1426 | 1426 | $srcset = ''; |
1427 | 1427 | |
1428 | 1428 | foreach ( $sources as $source ) { |
1429 | | $srcset .= str_replace( ' ', '%20', $source['url'] ) . ' ' . $source['value'] . $source['descriptor'] . ', '; |
| 1429 | $srcset .= $source['url'] . ' ' . $source['value'] . $source['descriptor'] . ', '; |
1430 | 1430 | } |
1431 | 1431 | |
1432 | 1432 | return rtrim( $srcset, ', ' ); |