Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 20574)
+++ wp-includes/media.php	(working copy)
@@ -724,6 +724,14 @@
  * @return string
  */
 function img_caption_shortcode($attr, $content = null) {
+	// New-style shortcode with the caption inside the shortcode with the link and image tags.
+	if ( ! isset( $attr['caption'] ) ) {
+		preg_match( '#(<a\s.*?<img\s.*?</a>)(.*)#is', $content, $matches ) || preg_match( '#(<img\s.*?>)(.*)#is', $content, $matches );
+		if ( $matches ) {
+			$content = $matches[1];
+			$attr['caption'] = trim( $matches[2] );
+		}
+	}
 
 	// Allow plugins/themes to override the default caption template.
 	$output = apply_filters('img_caption_shortcode', '', $attr, $content);
