diff --git a/src/wp-admin/async-upload.php b/src/wp-admin/async-upload.php
index 864f2be654..e643a21594 100644
|
a
|
b
|
if ( isset( $_REQUEST['attachment_id'] ) && (int) $_REQUEST['attachment_id'] && |
| 60 | 60 | // Title shouldn't ever be empty, but use filename just in case. |
| 61 | 61 | $file = get_attached_file( $post->ID ); |
| 62 | 62 | $file_url = wp_get_attachment_url( $post->ID ); |
| 63 | | $title = $post->post_title ? $post->post_title : wp_basename( $file ); |
| | 63 | $title = $post->post_title ? $post->post_title : esc_html( wp_basename( $file ) ); |
| 64 | 64 | ?> |
| 65 | 65 | <div class="filename new"> |
| 66 | 66 | <span class="media-list-title"><strong><?php echo esc_html( wp_html_excerpt( $title, 60, '…' ) ); ?></strong></span> |
| 67 | | <span class="media-list-subtitle"><?php echo wp_basename( $file ); ?></span> |
| | 67 | <span class="media-list-subtitle"><?php echo esc_html( wp_basename( $file ) ); ?></span> |
| 68 | 68 | </div> |
| 69 | 69 | </div> |
| 70 | 70 | <div class="attachment-tools"> |
| 71 | 71 | <span class="media-item-copy-container copy-to-clipboard-container edit-attachment"> |
| 72 | | <button type="button" class="button button-small copy-attachment-url" data-clipboard-text="<?php echo $file_url; ?>"><?php _e( 'Copy URL to clipboard' ); ?></button> |
| | 72 | <button type="button" class="button button-small copy-attachment-url" data-clipboard-text="<?php echo esc_url( $file_url ); ?>"><?php _e( 'Copy URL to clipboard' ); ?></button> |
| 73 | 73 | <span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span> |
| 74 | 74 | </span> |
| 75 | 75 | <?php |