Index: wp-includes/formatting.php
===================================================================
--- wp-includes/formatting.php	(revision 9837)
+++ wp-includes/formatting.php	(working copy)
@@ -964,17 +964,11 @@
  * @return string HTML A element with URI address.
  */
 function _make_url_clickable_cb($matches) {
-	$ret = '';
 	$url = $matches[2];
 	$url = clean_url($url);
 	if ( empty($url) )
 		return $matches[0];
-	// removed trailing [.,;:] from URL
-	if ( in_array(substr($url, -1), array('.', ',', ';', ':')) === true ) {
-		$ret = substr($url, -1);
-		$url = substr($url, 0, strlen($url)-1);
-	}
-	return $matches[1] . "<a href=\"$url\" rel=\"nofollow\">$url</a>" . $ret;
+	return $matches[1] . "<a href=\"$url\" rel=\"nofollow\">$url</a>";
 }
 
 /**
@@ -1035,7 +1029,7 @@
 function make_clickable($ret) {
 	$ret = ' ' . $ret;
 	// in testing, using arrays here was found to be faster
-	$ret = preg_replace_callback('#([\s>])([\w]+?://[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]*)#is', '_make_url_clickable_cb', $ret);
+	$ret = preg_replace_callback('#(?<=[\s>])(\()?([\w]+?://(?:[\w\\x80-\\xff\#$%&~/\-=?@\[\](+]|[.,;:](?![\s<])|(?(1)\)(?![\s<])|\)))*)#is', '_make_url_clickable_cb', $ret);
 	$ret = preg_replace_callback('#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]*)#is', '_make_web_ftp_clickable_cb', $ret);
 	$ret = preg_replace_callback('#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret);
 	// this one is not in an array because we need it to run last, for cleanup of accidental links within links

