aboutsummaryrefslogtreecommitdiff
path: root/views/default/output/url.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-02 20:16:13 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-02 20:16:13 +0000
commitb314a9a072d301e2e89c4873d76429ba46e9c94a (patch)
tree1897dba2a7dd360d8487c17d63d0b621e982b4e0 /views/default/output/url.php
parent7dd19a4cb04803f4d05fcd109b3149c6926b6558 (diff)
downloadelgg-b314a9a072d301e2e89c4873d76429ba46e9c94a.tar.gz
elgg-b314a9a072d301e2e89c4873d76429ba46e9c94a.tar.bz2
Refs #2463: Added url normalization support to output/url, output/confirmlink. Enhanced normalization to take care of urls like "example.com"
git-svn-id: http://code.elgg.org/elgg/trunk@7199 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/output/url.php')
-rw-r--r--views/default/output/url.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/views/default/output/url.php b/views/default/output/url.php
index 9dd0bf3f5..2a01e32d0 100644
--- a/views/default/output/url.php
+++ b/views/default/output/url.php
@@ -51,9 +51,7 @@ if (!empty($url)) {
$text = htmlentities($url, ENT_QUOTES, 'UTF-8');
}
- if ((substr_count($url, "http://") == 0) && (substr_count($url, "https://") == 0)) {
- $url = "http://" . $url;
- }
+ $url = elgg_normalize_url($url);
if (isset($vars['is_action'])) {
$url = elgg_add_action_tokens_to_url($url);