Administration: Escape admin title on output after the admin_title
filter runs, not before.
Props lalitpendhare, adnan.limdi, subrataemfluence, andraganescu. Fixes #41921. git-svn-id: https://develop.svn.wordpress.org/trunk@47474 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7ede058b16
commit
827d77e341
@ -32,14 +32,14 @@ if ( empty( $current_screen ) ) {
|
||||
}
|
||||
|
||||
get_admin_page_title();
|
||||
$title = esc_html( strip_tags( $title ) );
|
||||
$title = strip_tags( $title );
|
||||
|
||||
if ( is_network_admin() ) {
|
||||
/* translators: Network admin screen title. %s: Network title. */
|
||||
$admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_network()->site_name ) );
|
||||
$admin_title = sprintf( __( 'Network Admin: %s' ), get_network()->site_name );
|
||||
} elseif ( is_user_admin() ) {
|
||||
/* translators: User dashboard screen title. %s: Network title. */
|
||||
$admin_title = sprintf( __( 'User Dashboard: %s' ), esc_html( get_network()->site_name ) );
|
||||
$admin_title = sprintf( __( 'User Dashboard: %s' ), get_network()->site_name );
|
||||
} else {
|
||||
$admin_title = get_bloginfo( 'name' );
|
||||
}
|
||||
@ -71,7 +71,7 @@ wp_user_settings();
|
||||
|
||||
_wp_admin_html_begin();
|
||||
?>
|
||||
<title><?php echo $admin_title; ?></title>
|
||||
<title><?php echo esc_html( $admin_title ); ?></title>
|
||||
<?php
|
||||
|
||||
wp_enqueue_style( 'colors' );
|
||||
|
@ -150,7 +150,7 @@ $body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '
|
||||
$admin_title = sprintf( $wp_customize->get_document_title_template(), __( 'Loading…' ) );
|
||||
|
||||
?>
|
||||
<title><?php echo $admin_title; ?></title>
|
||||
<title><?php echo esc_html( $admin_title ); ?></title>
|
||||
|
||||
<script type="text/javascript">
|
||||
var ajaxurl = <?php echo wp_json_encode( admin_url( 'admin-ajax.php', 'relative' ) ); ?>,
|
||||
|
Loading…
Reference in New Issue
Block a user