Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 18555)
+++ wp-includes/post.php	(working copy)
@@ -3913,7 +3913,7 @@
 	if ( empty($url) ) //If any of the above options failed, Fallback on the GUID as used pre-2.7, not recomended to rely upon this.
 		$url = get_the_guid( $post->ID );
 
-	$url = apply_filters( 'wp_get_attachment_url', $url, $post->ID );
+	$url = apply_filters( 'wp_get_attachment_url', wp_double_encode_url($url), $post->ID );
 
 	if ( 'attachment' != $post->post_type || empty( $url ) )
 		return false;
@@ -3922,6 +3922,15 @@
 }
 
 /**
+ * Double encode any accidental %XX combinations in the filename (e.g. "My%20Picture.jpg")
+ * @param string $url
+ * @return string
+ */
+function wp_double_encode_url($url) {
+	return preg_replace('/%\d\d/e', "rawurlencode(rawurlencode(urldecode('$0')))", $url);
+}
+
+/**
  * Retrieve thumbnail for an attachment.
  *
  * @since 2.1.0
Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 18555)
+++ wp-includes/media.php	(working copy)
@@ -169,7 +169,7 @@
 		// we have the actual image size, but might need to further constrain it if content_width is narrower
 		list( $width, $height ) = image_constrain_size_for_editor( $width, $height, $size );
 
-		return array( $img_url, $width, $height, $is_intermediate );
+		return array( wp_double_encode_url($img_url), $width, $height, $is_intermediate );
 	}
 	return false;
 
