Make WordPress Core

Changeset 47474


Ignore:
Timestamp:
03/20/2020 02:18:53 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Administration: Escape admin title on output after the admin_title filter runs, not before.

Props lalitpendhare, adnan.limdi, subrataemfluence, andraganescu.
Fixes #41921.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

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

    r47219 r47474  
    3333
    3434get_admin_page_title();
    35 $title = esc_html( strip_tags( $title ) );
     35$title = strip_tags( $title );
    3636
    3737if ( is_network_admin() ) {
    3838    /* translators: Network admin screen title. %s: Network title. */
    39     $admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_network()->site_name ) );
     39    $admin_title = sprintf( __( 'Network Admin: %s' ), get_network()->site_name );
    4040} elseif ( is_user_admin() ) {
    4141    /* translators: User dashboard screen title. %s: Network title. */
    42     $admin_title = sprintf( __( 'User Dashboard: %s' ), esc_html( get_network()->site_name ) );
     42    $admin_title = sprintf( __( 'User Dashboard: %s' ), get_network()->site_name );
    4343} else {
    4444    $admin_title = get_bloginfo( 'name' );
     
    7272_wp_admin_html_begin();
    7373?>
    74 <title><?php echo $admin_title; ?></title>
     74<title><?php echo esc_html( $admin_title ); ?></title>
    7575<?php
    7676
  • trunk/src/wp-admin/customize.php

    r47198 r47474  
    151151
    152152?>
    153 <title><?php echo $admin_title; ?></title>
     153<title><?php echo esc_html( $admin_title ); ?></title>
    154154
    155155<script type="text/javascript">
Note: See TracChangeset for help on using the changeset viewer.