From 7efe34d79de9ca88d20d525c5ca29fe5710fc5fe Mon Sep 17 00:00:00 2001 From: Jon Cave Date: Tue, 7 Feb 2012 21:48:45 +0000 Subject: [PATCH] Export valid XML by escaping the closing CDATA sequence "]]>". Props ceefour. See #15203. git-svn-id: https://develop.svn.wordpress.org/trunk@19858 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/export.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index 412a629761..a1a78fa73f 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -117,13 +117,14 @@ function export_wp( $args = array() ) { * @since 2.1.0 * * @param string $str String to wrap in XML CDATA tag. + * @return string */ function wxr_cdata( $str ) { if ( seems_utf8( $str ) == false ) $str = utf8_encode( $str ); // $str = ent2ncr(esc_html($str)); - $str = "'; + $str = '', ']]]]>', $str ) . ']]>'; return $str; }