aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/output.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/engine/lib/output.php b/engine/lib/output.php
index cac7eeb5b..6f4ef7b96 100644
--- a/engine/lib/output.php
+++ b/engine/lib/output.php
@@ -150,7 +150,7 @@ function elgg_format_url($url) {
* elgg_normalize_url('http://google.com/'); // no change
* elgg_normalize_url('//google.com/'); // no change
*
- * @param string $url The URL to normalize
+ * @param string $url The URL to normalize
*
* @return string The absolute url
*/
@@ -167,7 +167,9 @@ function elgg_normalize_url($url) {
// 'pg/page/handler', 'mod/plugin/file.php'
else {
- return elgg_get_site_url().$url;
+ // trim off any leading / because the site URL is stored
+ // with a trailing /
+ return elgg_get_site_url() . ltrim($url, '/');
}
}