diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 6b5efd3559..4a42d4a211 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1773,7 +1773,10 @@ function redirect($url, $return = false)
}
else if (!empty($url_parts['scheme']) && !empty($url_parts['host']))
{
- // Full URL
+ if ($url_parts['host'] !== $user->host)
+ {
+ $url = generate_board_url(true);
+ }
}
else if ($url[0] == '/')
{
@@ -1987,11 +1990,14 @@ function meta_refresh($time, $url)
global $template;
$url = redirect($url, true);
+ $url = str_replace('&', '&', $url);
// For XHTML compatibility we change back & to &
$template->assign_vars(array(
- 'META' => '')
+ 'META' => '')
);
+
+ return $url;
}
//Form validation
@@ -2283,7 +2289,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
return;
}
- meta_refresh(3, $redirect);
+ $redirect = meta_refresh(3, $redirect);
trigger_error($message . '
' . sprintf($l_redirect, '', ''));
}