Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 23297)
+++ wp-includes/functions.php	(working copy)
@@ -468,7 +468,7 @@
 				}
 
 				if ( in_array( substr( $type, 0, strpos( $type, "/" ) ), $allowed_types ) ) {
-					add_post_meta( $post_ID, 'enclosure', "$url\n$len\n$mime\n" );
+					add_post_meta( $post_ID, 'enclosure', "$url\n$len\n$mime" );
 				}
 			}
 		}
Index: wp-includes/class-wp-xmlrpc-server.php
===================================================================
--- wp-includes/class-wp-xmlrpc-server.php	(revision 23297)
+++ wp-includes/class-wp-xmlrpc-server.php	(working copy)
@@ -4308,7 +4308,8 @@
 			foreach ( (array) get_post_custom($post_ID) as $key => $val) {
 				if ($key == 'enclosure') {
 					foreach ( (array) $val as $enc ) {
-						if ($enc == $encstring) {
+						// Trim the existing enclosure string in case it was saved with a trailing newline
+						if (trim($enc) == $encstring) {
 							$found = true;
 							break 2;
 						}
