Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#16405 closed defect (bug) (duplicate)

filter escaping close comment only

Reported by: pehrlich's profile pehrlich Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: close
Focuses: Cc:

Description (last modified by ocean90)

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)

#1 @solarissmoke
14 years ago

  • Keywords close added

wpautop has always had issues with comments - suggest closing as a duplicate of #2691

#2 @ocean90
14 years ago

  • Description modified (diff)

#3 @SergeyBiryukov
14 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

#4 @ocean90
14 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.