#29250 closed defect (bug) (invalid)
wp_kses() fails to allow HTML time tag
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.9.2 |
Component: | Formatting | Keywords: | |
Focuses: | Cc: |
Description
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 );
Change History (3)
Note: See
TracTickets for help on using
tickets.
If you check the value of $content directly before and after the call to wp_kses(), I think you will find the value is modified as expected.
Unless you can identify a core bug here, please use the support areas to get help troubleshooting your own code.