[wp-trac] [WordPress Trac] #54277: values within loop should be escaped properly before echo `wp-admin/theme-install.php`

WordPress Trac noreply at wordpress.org
Sun Oct 17 10:43:44 UTC 2021


#54277: values within loop should be escaped properly before echo `wp-admin/theme-
install.php`
--------------------------+-------------------------------
 Reporter:  sabbirshouvo  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Themes        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  coding-standards
--------------------------+-------------------------------

Comment (by mukesh27):

 Can we use escaped value directly instead of set variable for the escape
 value then use for print?


 {{{
 $feature_category = esc_html( $feature_category );
 echo '<legend>' . $feature_category . '</legend>';
 }}}


 Should be

 {{{
 echo '<legend>' . esc_html( $feature_category ) . '</legend>';
 }}}

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


More information about the wp-trac mailing list