[wp-trac] [WordPress Trac] #56128: Wrong escaping in 'class-wp-nav-menu-widget.php' file

WordPress Trac noreply at wordpress.org
Fri Jul 1 19:26:17 UTC 2022


#56128: Wrong escaping in 'class-wp-nav-menu-widget.php' file
--------------------------+-----------------------------------------------
 Reporter:  hztyfoon      |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  6.1
Component:  Widgets       |     Version:  4.3
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  administration, coding-standards
--------------------------+-----------------------------------------------

Comment (by SergeyBiryukov):

 I think something like this would work here, it follows the precedent of
 adding a similar comment in [53092]:
 {{{
 printf(
         /* translators: %s: URL to create a new menu. */
         __( 'No menus have been created yet. <a href="%s">Create
 some</a>.' ),
         // The URL can be a `javascript:` link, so esc_attr() is used here
 instead of esc_url().
         esc_attr( $url )
 );
 }}}

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


More information about the wp-trac mailing list