[wp-trac] [WordPress Trac] #29250: wp_kses() fails to allow HTML time tag

WordPress Trac noreply at wordpress.org
Mon Aug 18 12:22:19 UTC 2014


#29250: wp_kses() fails to allow HTML time tag
--------------------------+-----------------------------
 Reporter:  henry.wright  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.9.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 The {{{<time>}}} tag gets stripped even when I try to use it as an allowed
 HTML element in `wp_kses()`. For example:

 {{{
 function my_strip_tags( $content, $comment ) {

     $allowed_html = array(
         'time' => array(
             'datetime' => array()
         )
     );

     $content = wp_kses( $content, $allowed_html );
     return $content;
 }
 add_filter( 'comment_text', 'my_strip_tags', 10, 2 );
 }}}

 Ref: http://codex.wordpress.org/Function_Reference/wp_kses

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


More information about the wp-trac mailing list