=== modified file 'includes/common.inc'
--- includes/common.inc	
+++ includes/common.inc	
@@ -933,10 +933,11 @@ function format_date($timestamp, $type =
  */
 
 /**
- * Generate an internal Drupal URL.
+ * Generate a URL.
  *
  * @param $path
- *   The Drupal path being linked to, such as "admin/node".
+ *   The Drupal path or an URL being linked to, such as "admin/node" 
+ *   or "http://drupal.org/".
  * @param $query
  *   A query string to append to the link.
  * @param $fragment
@@ -972,6 +973,17 @@ function url($path = NULL, $query = NULL
     $fragment = '#'. $fragment;
   }
 
+  // Return an external link if $path contains an allowed absolute URL.
+  // Only call the slow filter_xss_bad_protocol if $path contains a ':'.
+  if (strpos($path, ':') !== FALSE && filter_xss_bad_protocol($path) == $path) {
+    if (isset($query)) {
+      return $path .'?'. $query . $fragment;
+    }
+    else {
+      return $path . $fragment;
+    }
+  }
+
   $base = ($absolute ? $base_url .'/' : '');
 
   // The special path '<front>' links to the default front page.
