[wp-trac] [WordPress Trac] #65397: Use esc_url() instead of esc_attr() for download link href in attachment_submitbox_metadata()

WordPress Trac noreply at wordpress.org
Thu Jun 4 21:11:04 UTC 2026


#65397: Use esc_url() instead of esc_attr() for download link href in
attachment_submitbox_metadata()
-------------------------------------------------+-------------------------
 Reporter:  thisismyurl                          |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  7.1
Component:  Media                                |     Version:  6.2
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing has-         |     Focuses:
  screenshots                                    |  administration
-------------------------------------------------+-------------------------

Comment (by jamesbregenzer):

 Tested PR 12062 locally.

 Environment:
 - WordPress 7.1-alpha-62161-src
 - Local wp-env/Docker environment
 - PHP 8.5.6

 Steps tested:
 1. Applied PR 12062 locally.
 2. Uploaded JPG, PDF, and ZIP files.
 3. Opened each attachment edit screen.
 4. Clicked the "Download file" link for each file type.

 Result:
 The Download file link worked correctly for JPG, PDF, and ZIP files.

 The patch tests successfully for me.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/65397#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list