WordPress.org

Make WordPress Core

Ticket #3670: 3670.diff

File 3670.diff, 665 bytes (added by Denis-de-Bernardy, 8 years ago)

conditionally disable CDATA blocks

  • wp-includes/post-template.php

     
    164164function the_content($more_link_text = null, $stripteaser = 0) {
    165165        $content = get_the_content($more_link_text, $stripteaser);
    166166        $content = apply_filters('the_content', $content);
    167         $content = str_replace(']]>', ']]>', $content);
     167        // a shortcode might have overridden $wp_query by calling query_posts()
     168        global $wp_the_query;
     169        if ( $wp_the_query->is_feed )
     170                $content = str_replace(']]>', ']]>', $content);
    168171        echo $content;
    169172}
    170173