diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-12-22 08:12:07 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-12-22 08:12:07 -0500 |
commit | e49df853b2cc3a6a9bc2dd527a64951050142eb9 (patch) | |
tree | 6f485b560f89331c65fad3993e055a1834b07177 /engine/lib/output.php | |
parent | 5e5b3705a5ca7b66dfe386490c5570af88b49009 (diff) | |
parent | fea599f1653d7206e34ac33c0c0a668cb587bc20 (diff) | |
download | elgg-e49df853b2cc3a6a9bc2dd527a64951050142eb9.tar.gz elgg-e49df853b2cc3a6a9bc2dd527a64951050142eb9.tar.bz2 |
Merge branch '1.8' after 1.8.2 release
Conflicts:
version.php
Diffstat (limited to 'engine/lib/output.php')
-rw-r--r-- | engine/lib/output.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engine/lib/output.php b/engine/lib/output.php index 989eca60e..6554481f5 100644 --- a/engine/lib/output.php +++ b/engine/lib/output.php @@ -234,7 +234,7 @@ function elgg_clean_vars(array $vars = array()) { * * @example * elgg_normalize_url(''); // 'http://my.site.com/' - * elgg_normalize_url('dashboard'); // 'http://my.site.com/dashboard' + * elgg_normalize_url('dashboard'); // 'http://my.site.com/dashboard' * elgg_normalize_url('http://google.com/'); // no change * elgg_normalize_url('//google.com/'); // no change * @@ -257,6 +257,11 @@ function elgg_normalize_url($url) { $validated = filter_var($url, FILTER_VALIDATE_URL); } + // work around for handling absoluate IRIs (RFC 3987) - see #4190 + if (!$validated && (strpos($url, 'http:') === 0) || (strpos($url, 'https:') === 0)) { + $validated = true; + } + if ($validated) { // all normal URLs including mailto: return $url; |