#16405 closed defect (bug) (duplicate)
filter escaping close comment only
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | close |
Focuses: | Cc: |
Description (last modified by )
WP 3.0.4
With this code on a page:
"wegege<!-- asd> -->ertgew"
the opening comment does not get escaped, while the closing does. Used in the following test code, which is used to display child pages on a parent page.
<?php global $post; $args = array( 'post_type' => 'page', 'numberposts' => 10, 'post_status' => 'publish', 'post_parent' => $post->ID, ); $attachments = get_posts($args); if ($attachments && is_page()) { foreach ($attachments as $post) { echo '<div class="box"> '; echo apply_filters('the_content', $post->post_content); // echo $post->post_content; echo '</div>'; } } ?>
Note that this snippet, in comparison, works correctly:
"wegege<!-- > -->ertgew"
Change History (4)
Note: See
TracTickets for help on using
tickets.
wpautop has always had issues with comments - suggest closing as a duplicate of #2691