From: Steve Clay Date: Wed, 20 Feb 2013 03:06:25 +0000 (-0500) Subject: Auto-prepend "http://" to URL profile fields without it X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=ed7210a35f3367bf6325ec805fcc7cad01f94c4c;p=lorea%2Felgg.git Auto-prepend "http://" to URL profile fields without it --- diff --git a/actions/profile/edit.php b/actions/profile/edit.php index 89bf2bc0b..63fb31600 100644 --- a/actions/profile/edit.php +++ b/actions/profile/edit.php @@ -48,6 +48,10 @@ foreach ($profile_fields as $shortname => $valuetype) { forward(REFERER); } + if ($valuetype == 'url' && !preg_match('~^https?\://~i', $value)) { + $value = "http://$value"; + } + if ($valuetype == 'tags') { $value = string_to_tag_array($value); }