Index: includes/common.inc =================================================================== --- includes/common.inc (revision 47) +++ includes/common.inc (working copy) @@ -2094,10 +2094,22 @@ * Return TRUE if a path is external (e.g. http://example.com). */ function url_is_external($path) { - $colonpos = strpos($path, ':'); // Only call the slow filter_xss_bad_protocol if $path contains a ':' // before any / ? or #. - return $colonpos !== FALSE && !preg_match('![/?#]!', substr($path, 0, $colonpos)) && filter_xss_bad_protocol($path, FALSE) == check_plain($path); + $colonpos = strpos($path, ':'); + if ($colonpos !== FALSE && !preg_match('![/?#]!', substr($path, 0, $colonpos)) && filter_xss_bad_protocol($path, FALSE) == check_plain($path)) { + return TRUE; + } + //If it begins with a /, then it is considered external to drupal, but local to our domain. + //We should ensure that it is not supposed to be a drupal path with an accidental / on the front. + else if ((strpos($path, '/') === 0) && !menu_get_item(ltrim($path, '/'))) { + return TRUE; + } + else { + return FALSE; + } + + } /** Index: includes/menu.inc =================================================================== --- includes/menu.inc (revision 47) +++ includes/menu.inc (working copy) @@ -783,6 +783,9 @@ $item['access'] = 1; $map = array(); $item['href'] = $item['link_path']; + //external paths beginning with / are local to our domain. + //trim the / to ensure it displays correctly. + $item['href'] = ltrim($item['href'], '/'); $item['title'] = $item['link_title']; $item['localized_options'] = $item['options']; } Index: modules/menu/menu.admin.inc =================================================================== --- modules/menu/menu.admin.inc (revision 47) +++ modules/menu/menu.admin.inc (working copy) @@ -281,7 +281,7 @@ '#type' => 'textfield', '#title' => t('Path'), '#default_value' => $path, - '#description' => t('The path for this menu link. This can be an internal Drupal path such as %add-node or an external URL such as %drupal. Enter %front to link to the front page.', array('%front' => '', '%add-node' => 'node/add', '%drupal' => 'http://drupal.org')), + '#description' => t('The path for this menu link. This can be an internal Drupal path such as %add-node or an external URL such as %drupal. Enter %front to link to the front page. To link to a URL local to your domain, but external to drupal, precede the path with a /, such as %local_path', array('%front' => '', '%add-node' => 'node/add', '%drupal' => 'http://drupal.org', '%local_path' => '/myfile.html')), '#required' => TRUE, ); $form['delete'] = array(