[wp-trac] [WordPress Trac] #62606: Dismiss Button in Media Upload Error Message Not Working

WordPress Trac noreply at wordpress.org
Fri Nov 29 06:15:04 UTC 2024


#62606: Dismiss Button in Media Upload Error Message Not Working
--------------------------+-----------------------------
 Reporter:  sukhendu2002  |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  6.7.1
 Severity:  normal        |   Keywords:  has-screenshots
  Focuses:  javascript    |
--------------------------+-----------------------------
 When an unsupported file is uploaded via the "Upload New Media" section,
 an error message is displayed. However, the "Dismiss" button on the error
 message does not function as expected.

 The issue occurs because the onclick attribute on the dismiss button is
 stripped out due to `wp_admin_notice()` using `wp_kses_post()` internally.

 Steps to Reproduce:
 - Navigate to Media > Add New Media File in the admin dashboard.
 - Attempt to upload an unsupported file type (e.g., a .exe file).
 - Observe that an error message appears.
 - Click the "Dismiss" button on the error message.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62606>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list