diff options
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc index 2bd402a05..d0d8bad0b 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1227,11 +1227,18 @@ function url($path = NULL, $options = array()) { $base = $options['absolute'] ? $base_url .'/' : base_path(); + // Preserve the original path before aliasing. + $original_path = $path; + // The special path '<front>' links to the default front page. if (!empty($path) && $path != '<front>') { if (!$options['alias']) { $path = drupal_get_path_alias($path); } + if (function_exists('custom_url_rewrite_outbound')) { + // Modules may alter outbound links by reference. + custom_url_rewrite_outbound($path, $options, $original_path); + } $path = drupal_urlencode($path); if (!$clean_url) { if ($options['query']) { |