WordPress.org

Make WordPress Core

Ticket #29621: 29621.2.diff

File 29621.2.diff, 1.0 KB (added by GaryJ, 5 years ago)

Messy but more backwards-compatible solution

  • src/wp-admin/includes/export.php

    diff --git src/wp-admin/includes/export.php src/wp-admin/includes/export.php
    index 397e9e7..fe7b413 100644
    function export_wp( $args = array() ) { 
    391391                $is_sticky = is_sticky( $post->ID ) ? 1 : 0;
    392392?>
    393393        <item>
    394                 <?php /** This filter is documented in wp-includes/feed.php */ ?>
     394                <?php
     395                remove_filter( 'the_title_rss', 'strip_tags' );
     396                remove_filter( 'the_title_rss', 'ent2ncr', 8 );
     397                remove_filter( 'the_title_rss', 'esc_html' );
     398                add_filter( 'the_title_rss', 'wxr_cdata' );
     399                /** This filter is documented in wp-includes/feed.php */ ?>
    395400                <title><?php echo apply_filters( 'the_title_rss', $post->post_title ); ?></title>
     401                <?php remove_filter( 'the_title_rss', 'wxr_cdata' ); ?>
    396402                <link><?php the_permalink_rss() ?></link>
    397403                <pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ); ?></pubDate>
    398404                <dc:creator><?php echo wxr_cdata( get_the_author_meta( 'login' ) ); ?></dc:creator>