[wp-trac] [WordPress Trac] #61561: autofocus query string parameter in customizer url is broken in WP6.6-RC2

WordPress Trac noreply at wordpress.org
Wed Jul 3 16:38:58 UTC 2024


#61561: autofocus query string parameter in customizer url is broken in WP6.6-RC2
--------------------------+-----------------------------
 Reporter:  jamesros161   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-----------------------------
 When using a query string parameter to autofocus in the customizer, it is
 broken by using the sanitize_text_field() function.

 Example: customize.php?autofocus%5Bsection%5D=colors

 Line 89 of /wp-admin/customize.php uses sanitize_text_field to sanitize
 the `$_REQUEST['autofocus']` variable. However, this variable is an array,
 not a string. Therefore it will always return an empty string when being
 sanitized this way.

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


More information about the wp-trac mailing list