diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 08f8be32fd..fabf2dad4f 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -105,6 +105,7 @@
[Fix] Correct redirection after login to forum not in web root (Bug #58755)
[Fix] Allow setting parent forums regardless of permission settings. (Bug #57415)
[Fix] Redirect search engines that access pages with SIDs in the URL. (Bug #58025)
+ [Fix] Fix incorrect ampersand encoding in redirect parameter. (Bug #58465)
[Feature] Support for Microsoft's Native SQL Server Driver for PHP (Bug #57055 - Patch by Chris Pucci at Microsoft)
[Feature] The memcache acm plugin now supports multiple memcache servers.
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 5878c1977d..4f52c7c2ce 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -4257,7 +4257,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'S_TOPIC_ID' => $topic_id,
'S_LOGIN_ACTION' => ((!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("index.$phpEx", false, true, $user->session_id)),
- 'S_LOGIN_REDIRECT' => build_hidden_fields(array('redirect' => str_replace('&', '&', build_url()))),
+ 'S_LOGIN_REDIRECT' => build_hidden_fields(array('redirect' => build_url())),
'S_ENABLE_FEEDS' => ($config['feed_enable']) ? true : false,
'S_ENABLE_FEEDS_OVERALL' => ($config['feed_overall']) ? true : false,