Media: Properly escape Download row action link in Media List Table.

Props joedolson, pbiron, audrasjb.
Fixes #57574.


git-svn-id: https://develop.svn.wordpress.org/trunk@55221 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras 2023-02-04 07:08:22 +00:00
parent ca76a8d907
commit d90afeeb69

View File

@ -852,7 +852,7 @@ class WP_Media_List_Table extends WP_List_Table {
$actions['download'] = sprintf(
'<a href="%s" aria-label="%s" download>%s</a>',
wp_get_attachment_url( $post->ID ),
esc_url( wp_get_attachment_url( $post->ID ) ),
/* translators: %s: Attachment title. */
esc_attr( sprintf( __( 'Download &#8220;%s&#8221;' ), $att_title ) ),
__( 'Download file' )