Make WordPress Core

Changeset 47110


Ignore:
Timestamp:
01/25/2020 10:04:08 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty: Remove unnecessary escaping of get_the_title() in comments.php.

For users with the unfiltered_html capability, titles can contain legitimate markup.

The title is filtered on saving, so the content in the database is considered safe.

Props kjellr, joyously, peterwilsoncc.
Fixes #49190.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/comments.php

    r46827 r47110  
    3535            } elseif ( '1' === $comments_number ) {
    3636                /* translators: %s: post title */
    37                 printf( _x( 'One reply on “%s”', 'comments title', 'twentytwenty' ), esc_html( get_the_title() ) );
     37                printf( _x( 'One reply on “%s”', 'comments title', 'twentytwenty' ), get_the_title() );
    3838            } else {
    39                 echo sprintf(
     39                printf(
    4040                    /* translators: 1: number of comments, 2: post title */
    4141                    _nx(
     
    4747                    ),
    4848                    number_format_i18n( $comments_number ),
    49                     esc_html( get_the_title() )
     49                    get_the_title()
    5050                );
    5151            }
Note: See TracChangeset for help on using the changeset viewer.