Skip to content

Commit 04e4e6f

Browse files
committed
Coding Standards: Escape attachment URL in wp-admin/async-upload.php.
Follow-up to [58279]. Reviewed by jorbin. Merges [59407] to the 6.7 branch. Props shyamkariya, pitamdey, nareshbheda, ketanniruke, desrosj, SergeyBiryukov . Fixes #62434. git-svn-id: https://develop.svn.wordpress.org/branches/6.7@59538 602fd350-edb4-49c9-b593-d223f7449a82
1 parent dfe773a commit 04e4e6f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/wp-admin/async-upload.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@
7474
}
7575
?>
7676
<span class="media-item-copy-container copy-to-clipboard-container edit-attachment">
77-
<button type="button" class="button button-small copy-attachment-url" data-clipboard-text="<?php echo $file_url; ?>"><?php _e( 'Copy URL to clipboard' ); ?></button>
77+
<button type="button" class="button button-small copy-attachment-url"
78+
data-clipboard-text="<?php echo esc_url( $file_url ); ?>"
79+
><?php _e( 'Copy URL to clipboard' ); ?></button>
7880
<span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
7981
</span>
8082
</div>

0 commit comments

Comments
 (0)