Make WordPress Core

Ticket #3670: 3670.001.diff

File 3670.001.diff, 1.6 KB (added by AaronCampbell, 16 years ago)
  • trunk/wp-includes/feed.php

     
    4848        } elseif ( 0 == $encode_html ) {
    4949                $content = make_url_footnote($content);
    5050        } elseif ( 2 == $encode_html ) {
     51            $content = preg_replace('|//\s*<!\[CDATA\[|', '<![CDATA[', $content);
    5152                $content = strip_tags($content);
    5253        }
    5354        if ( $cut ) {
  • trunk/wp-includes/formatting.php

     
    831832                $text = get_the_content('');
    832833                $text = apply_filters('the_content', $text);
    833834                $text = str_replace(']]>', ']]&gt;', $text);
     835                $text = preg_replace('|//\s*<!\[CDATA\[|', '<![CDATA[', $text);
    834836                $text = strip_tags($text);
    835837                $excerpt_length = 55;
    836838                $words = explode(' ', $text, $excerpt_length + 1);
  • trunk/wp-includes/post-template.php

     
    7777function the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
    7878        $content = get_the_content($more_link_text, $stripteaser, $more_file);
    7979        $content = apply_filters('the_content', $content);
    80         $content = str_replace(']]>', ']]&gt;', $content);
     80        if (is_feed())
     81                $content = str_replace(']]>', ']]&gt;', $content);
    8182        echo $content;
    8283}
    8384