Index: wp-content/themes/twentyeleven/functions.php
===================================================================
--- wp-content/themes/twentyeleven/functions.php	(revision 17768)
+++ wp-content/themes/twentyeleven/functions.php	(working copy)
@@ -433,21 +433,10 @@
  * Grab the first URL from a Link post
  */
 function twentyeleven_url_grabber() {
-	global $post, $posts;
-
-	$first_url = '';
-
-	ob_start();
-	ob_end_clean();
-
-	$output = preg_match_all('/<a.+href=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
-
-	$first_url = $matches [1] [0];
-
-	if ( empty( $first_url ) )
+	if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) )
 		return false;
 
-	return $first_url;
+	return esc_url_raw( $matches[1] );
 }
 
 /**
@@ -547,4 +536,4 @@
 			break;
 	endswitch;
 }
-endif; // ends check for twentyeleven_comment()
\ No newline at end of file
+endif; // ends check for twentyeleven_comment()
