diff --git src/wp-includes/feed.php src/wp-includes/feed.php
index dbeb3a0..fc885bf 100644
--- src/wp-includes/feed.php
+++ src/wp-includes/feed.php
@@ -449,7 +449,7 @@ function html_type_rss() {
  * the user has the password for the post. If not then it will return before
  * displaying.
  *
- * Also uses the function get_post_custom() to get the post's 'enclosure'
+ * Also uses the function get_post_meta() to get the post's 'enclosure'
  * metadata field and parses the value to display the enclosure(s). The
  * enclosure(s) consist of enclosure HTML tag(s) with a URI and other
  * attributes.
@@ -460,24 +460,24 @@ function rss_enclosure() {
 	if ( post_password_required() )
 		return;
 
-	foreach ( (array) get_post_custom() as $key => $val) {
-		if ($key == 'enclosure') {
-			foreach ( (array) $val as $enc ) {
-				$enclosure = explode("\n", $enc);
-
-				// only get the first element, e.g. audio/mpeg from 'audio/mpeg mpga mp2 mp3'
-				$t = preg_split('/[ \t]/', trim($enclosure[2]) );
-				$type = $t[0];
-
-				/**
-				 * Filters the RSS enclosure HTML link tag for the current post.
-				 *
-				 * @since 2.2.0
-				 *
-				 * @param string $html_link_tag The HTML link tag with a URI and other attributes.
-				 */
-				echo apply_filters( 'rss_enclosure', '<enclosure url="' . trim( htmlspecialchars( $enclosure[0] ) ) . '" length="' . trim( $enclosure[1] ) . '" type="' . $type . '" />' . "\n" );
-			}
+	$meta_enclosures = get_post_meta( get_the_ID(), 'enclosure', false );
+
+	foreach ( (array) $meta_enclosures as $key => $val ){ 
+		foreach ( (array) $val as $enc ) {
+			$enclosure = explode("\n", $enc);
+
+			// only get the first element, e.g. audio/mpeg from 'audio/mpeg mpga mp2 mp3'
+			$t = preg_split('/[ \t]/', trim($enclosure[2]) );
+			$type = $t[0];
+
+			/**
+			 * Filters the RSS enclosure HTML link tag for the current post.
+			 *
+			 * @since 2.2.0
+			 *
+			 * @param string $html_link_tag The HTML link tag with a URI and other attributes.
+			 */
+			echo apply_filters( 'rss_enclosure', '<enclosure url="' . trim( htmlspecialchars( $enclosure[0] ) ) . '" length="' . trim( $enclosure[1] ) . '" type="' . $type . '" />' . "\n" );
 		}
 	}
 }
@@ -489,7 +489,7 @@ function rss_enclosure() {
  * the user has the password for the post. If not then it will return before
  * displaying.
  *
- * Also uses the function get_post_custom() to get the post's 'enclosure'
+ * Also uses the function get_post_meta() to get the post's 'enclosure'
  * metadata field and parses the value to display the enclosure(s). The
  * enclosure(s) consist of link HTML tag(s) with a URI and other attributes.
  *
@@ -499,19 +499,19 @@ function atom_enclosure() {
 	if ( post_password_required() )
 		return;
 
-	foreach ( (array) get_post_custom() as $key => $val ) {
-		if ($key == 'enclosure') {
-			foreach ( (array) $val as $enc ) {
-				$enclosure = explode("\n", $enc);
-				/**
-				 * Filters the atom enclosure HTML link tag for the current post.
-				 *
-				 * @since 2.2.0
-				 *
-				 * @param string $html_link_tag The HTML link tag with a URI and other attributes.
-				 */
-				echo apply_filters( 'atom_enclosure', '<link href="' . trim( htmlspecialchars( $enclosure[0] ) ) . '" rel="enclosure" length="' . trim( $enclosure[1] ) . '" type="' . trim( $enclosure[2] ) . '" />' . "\n" );
-			}
+	$meta_enclosures = get_post_meta( get_the_ID(), 'enclosure', false );
+
+	foreach ( (array) $meta_enclosures as $key => $val ){ 
+		foreach ( (array) $val as $enc ) {
+			$enclosure = explode("\n", $enc);
+			/**
+			 * Filters the atom enclosure HTML link tag for the current post.
+			 *
+			 * @since 2.2.0
+			 *
+			 * @param string $html_link_tag The HTML link tag with a URI and other attributes.
+			 */
+			echo apply_filters( 'atom_enclosure', '<link href="' . trim( htmlspecialchars( $enclosure[0] ) ) . '" rel="enclosure" length="' . trim( $enclosure[1] ) . '" type="' . trim( $enclosure[2] ) . '" />' . "\n" );
 		}
 	}
 }
diff --git tests/phpunit/tests/feed/atom.php tests/phpunit/tests/feed/atom.php
index fbe064b..e99c999 100644
--- tests/phpunit/tests/feed/atom.php
+++ tests/phpunit/tests/feed/atom.php
@@ -197,4 +197,49 @@ class Tests_Feeds_Atom extends WP_UnitTestCase {
 			}
 		}
 	}
+
+        /**
+         * @ticket 41905 
+         */
+        function test_atom_and_rss_enclosures() {
+
+		$meta_enclosures = array(
+			"https://wordpress.dev/wp-content/uploads/2017/09/movie.mp4\n318465\nvideo/mp4",
+			"https://wordpress.dev/wp-content/uploads/2017/01/audio.mp3\n48934\naudio/mpeg",
+		);
+
+		$expected  = array(
+			'<link href="https://wordpress.dev/wp-content/uploads/2017/09/movie.mp4" rel="enclosure" length="318465" type="video/mp4" />',
+			'<link href="https://wordpress.dev/wp-content/uploads/2017/01/audio.mp3" rel="enclosure" length="48934" type="audio/mpeg" />',
+		);
+
+		// Latest post ID
+		$post_id = end( self::$posts );
+
+		// Add enclosure meta
+		foreach( $meta_enclosures as $meta_enclosure ) {		
+			add_post_meta( $post_id, 'enclosure', $meta_enclosure );
+		}
+
+		$old_post = isset( $GLOBALS['post'] ) ? $GLOBALS['post'] : null;
+		$GLOBALS['post'] = get_post( $post_id );
+
+		// Atom enclosure
+		ob_start();
+		atom_enclosure();
+		$this->assertSame( ob_get_clean(), join( '', $expected ) );
+
+		// RSS enclosure
+		ob_start();
+		rss_enclosure();
+		$this->assertSame( ob_get_clean(), join( '', $expected ) );
+		
+		// Cleanup
+		if( is_null( $old_post ) )
+			unset( $GLOBALS['post'] );
+		else
+			$GLOBALS['post'] = $old_post;
+
+        }
+
 }
