diff --git a/includes/common.inc b/includes/common.inc index 0ff70c9..e833ad2 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -723,6 +723,12 @@ function _external_url_is_local($url) { $url_parts['path'] = '/'; } + // Force the external path to have a trailing slash for the comparison below, + // since base_path() always has one. + if (substr($url_parts['path'], -1) != '/') { + $url_parts['path'] .= '/'; + } + // When comparing base paths, we need a trailing slash to make sure a // partial URL match isn't occuring. Since base_path() always returns with // a trailing slash, we don't need to add the trailing slash here.