From 3e3b98aad7ec74bba0bb5ea309ec81d7ba1fbd27 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 25 Jan 2020 22:04:08 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@47110 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentytwenty/comments.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-content/themes/twentytwenty/comments.php b/src/wp-content/themes/twentytwenty/comments.php index 3a435296c8..6a13a06c0c 100644 --- a/src/wp-content/themes/twentytwenty/comments.php +++ b/src/wp-content/themes/twentytwenty/comments.php @@ -34,9 +34,9 @@ if ( $comments ) { _e( 'Leave a comment', 'twentytwenty' ); } elseif ( '1' === $comments_number ) { /* translators: %s: post title */ - printf( _x( 'One reply on “%s”', 'comments title', 'twentytwenty' ), esc_html( get_the_title() ) ); + printf( _x( 'One reply on “%s”', 'comments title', 'twentytwenty' ), get_the_title() ); } else { - echo sprintf( + printf( /* translators: 1: number of comments, 2: post title */ _nx( '%1$s reply on “%2$s”', @@ -46,7 +46,7 @@ if ( $comments ) { 'twentytwenty' ), number_format_i18n( $comments_number ), - esc_html( get_the_title() ) + get_the_title() ); }