Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 5149)
+++ wp-includes/functions.php	(working copy)
@@ -506,7 +506,7 @@
 	$punc = '.:?\-';
 	$any = $ltrs . $gunk . $punc;
 
-	preg_match_all("{\b http : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp);
+	preg_match_all("{\b https? : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp);
 
 	debug_fwrite($log, 'Post contents:');
 	debug_fwrite($log, $content."\n");
@@ -547,12 +547,20 @@
 	$parts = parse_url( $url );
 	$file = $parts['path'] . ($parts['query'] ? '?'.$parts['query'] : '');
 	$host = $parts['host'];
-	if ( !isset( $parts['port'] ) )
-		$parts['port'] = 80;
+	$scheme = "";
+	if ( $parts['scheme'] == "https" )
+		$scheme = "ssl://";
+	if ( !isset( $parts['port'] ) ) {
+		if($scheme) {
+			$parts['port'] = 443;
+		} else {
+			$parts['port'] = 80;
+		}
+	}	
 
 	$head = "HEAD $file HTTP/1.1\r\nHOST: $host\r\nUser-Agent: WordPress/" . $wp_version . "\r\n\r\n";
 
-	$fp = @fsockopen($host, $parts['port'], $err_num, $err_msg, 3);
+	$fp = @fsockopen($scheme.$host, $parts['port'], $err_num, $err_msg, 3);
 	if ( !$fp )
 		return false;
 
