Administration: Consistently escape admin_url() links.

Props chintan1896, mukesh27.
Fixes #53426.

git-svn-id: https://develop.svn.wordpress.org/trunk@51177 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-06-17 14:35:59 +00:00
parent c62f77e2e8
commit d3c8a93cad
14 changed files with 21 additions and 21 deletions

View File

@@ -87,7 +87,7 @@ if ( 'grid' === $mode ) {
<?php
if ( current_user_can( 'upload_files' ) ) {
?>
<a href="<?php echo admin_url( 'media-new.php' ); ?>" class="page-title-action aria-button-if-js"><?php echo esc_html_x( 'Add New', 'file' ); ?></a>
<a href="<?php echo esc_url( admin_url( 'media-new.php' ) ); ?>" class="page-title-action aria-button-if-js"><?php echo esc_html_x( 'Add New', 'file' ); ?></a>
<?php
}
?>
@@ -272,7 +272,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<?php
if ( current_user_can( 'upload_files' ) ) {
?>
<a href="<?php echo admin_url( 'media-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a>
<a href="<?php echo esc_url( admin_url( 'media-new.php' ) ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a>
<?php
}