Make WordPress Core

Changeset 59407


Ignore:
Timestamp:
11/16/2024 11:13:43 PM (2 weeks ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Escape attachment URL in wp-admin/async-upload.php.

Follow-up to [58279].

Props shyamkariya, pitamdey, nareshbheda, ketanniruke, desrosj.
Fixes #62434.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/async-upload.php

    r58279 r59407  
    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>
Note: See TracChangeset for help on using the changeset viewer.