diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2012-10-19 13:53:37 -0400 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2012-10-19 13:53:37 -0400 |
commit | e6ab6c957aa6b2382abdfa2c7c8c60623a4e17f9 (patch) | |
tree | 2101229ba417ad4eee86dfe30005e8790dd4069e | |
parent | b412b990eb3e8d30acbcf927c531d77f529ce8c4 (diff) | |
download | elgg-e6ab6c957aa6b2382abdfa2c7c8c60623a4e17f9.tar.gz elgg-e6ab6c957aa6b2382abdfa2c7c8c60623a4e17f9.tar.bz2 |
Added special checks for mailto: in elgg_normalize_url() and elgg.normalize_url().
-rw-r--r-- | engine/lib/output.php | 4 | ||||
-rw-r--r-- | js/lib/elgglib.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/engine/lib/output.php b/engine/lib/output.php index 7bfc4be6e..0069360f0 100644 --- a/engine/lib/output.php +++ b/engine/lib/output.php @@ -271,8 +271,8 @@ function elgg_normalize_url($url) { // '?query=test', #target return $url; - } elseif (stripos($url, 'javascript:') === 0) { - // 'javascript:' + } elseif (stripos($url, 'javascript:') === 0 || stripos($url, 'mailto:') === 0) { + // 'javascript:' and 'mailto:' // Not covered in FILTER_VALIDATE_URL return $url; diff --git a/js/lib/elgglib.js b/js/lib/elgglib.js index 81209ebd0..dc7c07165 100644 --- a/js/lib/elgglib.js +++ b/js/lib/elgglib.js @@ -283,7 +283,7 @@ elgg.normalize_url = function(url) { } // 'javascript:' - else if (url.indexOf('javascript:') === 0) { + else if (url.indexOf('javascript:') === 0 || url.indexOf('mailto:') === 0 ) { return url; } |