From c28e516c80dbfa7d621ff04d933cf4511283ce79 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 16 Apr 2019 15:57:53 +0000 Subject: [PATCH] Export: Remove extra whitespace from ``, `<content:encoded>`, and `<excerpt:encoded>` elements in WXR files. Props sgastard, juliarrr, aristath, SergeyBiryukov. Fixes #46575. Built from https://develop.svn.wordpress.org/trunk@45216 git-svn-id: http://core.svn.wordpress.org/trunk@45025 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/export.php | 39 ++++++++++++++++-------------------- wp-includes/version.php | 2 +- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index 0b5f180923..5600371455 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -530,22 +530,10 @@ function export_wp( $args = array() ) { // Begin Loop. foreach ( $posts as $post ) { setup_postdata( $post ); - $is_sticky = is_sticky( $post->ID ) ? 1 : 0; - ?> - <item> - <title> - <?php + /** This filter is documented in wp-includes/feed.php */ - echo apply_filters( 'the_title_rss', $post->post_title ); - ?> - - - - - - - - post_title ); + /** * Filters the post content used for WXR exports. * @@ -553,11 +541,8 @@ function export_wp( $args = array() ) { * * @param string $post_content Content of the current post. */ - echo wxr_cdata( apply_filters( 'the_content_export', $post->post_content ) ); - ?> - - - post_content ) ); + /** * Filters the post excerpt used for WXR exports. * @@ -565,9 +550,19 @@ function export_wp( $args = array() ) { * * @param string $post_excerpt Excerpt for the current post. */ - echo wxr_cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) ); + $excerpt = wxr_cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) ); + + $is_sticky = is_sticky( $post->ID ) ? 1 : 0; ?> - + + <?php echo $title; ?> + + + + + + + ID ); ?> post_date ); ?> post_date_gmt ); ?> diff --git a/wp-includes/version.php b/wp-includes/version.php index 368532ae8b..99604eb18f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-beta3-45215'; +$wp_version = '5.2-beta3-45216'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.