Index: wp-includes/shortcodes.php
===================================================================
--- wp-includes/shortcodes.php	(revision 33550)
+++ wp-includes/shortcodes.php	(working copy)
@@ -394,7 +394,7 @@
 				if ( $count > 0 ) {
 					// Sanitize the shortcode output using KSES.
 					$new_attr = wp_kses_one_attr( $new_attr, $elname );
-					if ( '' !== $new_attr ) {
+					if ( '' !== trim( $new_attr ) ) {
 						// The shortcode is safe to use now.
 						$attr = $new_attr;
 					}
