From 63d2516b62e39beea60bde5343c37761043de917 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Wed, 28 Sep 2022 12:38:49 +0000 Subject: [PATCH] Twenty Ten: Escape `get_author_posts_url()` where appropriate in `functions.php` file. This changeset adds missing escaping to some instances of `get_author_posts_url()` used in Twenty Ten, as per WordPress Coding Standards. Props hztyfoon, robinwpdeveloper, mukesh27, rudlinkon, SergeyBiryukov, jakariaistauk. Fixes #56674. git-svn-id: https://develop.svn.wordpress.org/trunk@54344 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyten/functions.php | 2 +- src/wp-content/themes/twentyten/loop-attachment.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentyten/functions.php b/src/wp-content/themes/twentyten/functions.php index 2996bd2450..bd0e19f119 100644 --- a/src/wp-content/themes/twentyten/functions.php +++ b/src/wp-content/themes/twentyten/functions.php @@ -613,7 +613,7 @@ if ( ! function_exists( 'twentyten_posted_on' ) ) : ), sprintf( '%3$s', - get_author_posts_url( get_the_author_meta( 'ID' ) ), + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), /* translators: %s: Author display name. */ esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ), get_the_author() diff --git a/src/wp-content/themes/twentyten/loop-attachment.php b/src/wp-content/themes/twentyten/loop-attachment.php index 98981f5f81..b886c019e8 100644 --- a/src/wp-content/themes/twentyten/loop-attachment.php +++ b/src/wp-content/themes/twentyten/loop-attachment.php @@ -45,7 +45,7 @@ if ( have_posts() ) { 'meta-prep meta-prep-author', sprintf( '', - get_author_posts_url( get_the_author_meta( 'ID' ) ), + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), /* translators: %s: Author display name. */ esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ), get_the_author()