diff --git a/includes/common.inc b/includes/common.inc index 9a28c06..56e493b 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1558,6 +1558,10 @@ function url($path = NULL, $options = array()) { } elseif (!empty($path) && !$options['alias']) { $path = drupal_get_path_alias($path, isset($options['language']) ? $options['language']->language : ''); + // Strip leading slashes from internal paths to prevent them becoming external + // URLs without protocol. /example.com should not be turned into + // //example.com. + $path = ltrim($path, '/'); } if (function_exists('custom_url_rewrite_outbound')) {