[wp-trac] [WordPress Trac] #61430: Adding escaping function in wp_interactivity_data_wp_context PHPDoc

WordPress Trac noreply at wordpress.org
Thu Jun 13 12:02:23 UTC 2024


#61430: Adding escaping function in wp_interactivity_data_wp_context PHPDoc
-------------------------------+-----------------------------
 Reporter:  mosne              |      Owner:  (none)
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Interactivity API  |    Version:  6.5
 Severity:  minor              |   Keywords:
  Focuses:  docs               |
-------------------------------+-----------------------------
 in the /wp-includes/interactivity-api/interactivity-api.php the following
 example is given in the PHPDoc:

 {{{#!php
 <div <?php echo wp_interactivity_data_wp_context( array( 'isOpen' => true,
 'count' => 0 ) ); ?>>
 }}}

 We should always follow best practices, so I propose adding proper
 escaping:

 {{{#!php
 <div <?php echo wwp_kses_data( wp_interactivity_data_wp_context( array(
 'isOpen' => true, 'count' => 0  ) ) ); ?>>
 }}}

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


More information about the wp-trac mailing list