Merge pull request #891 from tobiasd/check_http_in_homepage

added a check for http in homepage url, this should fix issue #768
This commit is contained in:
fabrixxm 2014-01-18 00:59:17 -08:00
commit f412934e7d

View file

@ -288,6 +288,10 @@ function profiles_post(&$a) {
$sexual = notags(trim($_POST['sexual'])); $sexual = notags(trim($_POST['sexual']));
$homepage = notags(trim($_POST['homepage'])); $homepage = notags(trim($_POST['homepage']));
if (strpos($homepage, 'http') !== 0) {
// neither http nor https in URL, add them
$homepage = 'http://'.$homepage;
}
$hometown = notags(trim($_POST['hometown'])); $hometown = notags(trim($_POST['hometown']));
$politic = notags(trim($_POST['politic'])); $politic = notags(trim($_POST['politic']));
$religion = notags(trim($_POST['religion'])); $religion = notags(trim($_POST['religion']));