1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-06 15:45:34 +02:00

Merge pull request #2419 from prototech/ticket/12510

[ticket/12510] Convert & to & in build_url() when no params are stripped.

* prototech/ticket/12510:
  [ticket/12510] Convert & to & in build_url() when no params are stripped.
This commit is contained in:
Joas Schilling 2014-05-08 13:02:01 +02:00
commit aade62b0a3
2 changed files with 9 additions and 0 deletions

View File

@ -2356,6 +2356,10 @@ function build_url($strip_vars = false)
{
$redirect = $phpbb_path_helper->strip_url_params($redirect, $strip_vars, false);
}
else
{
$redirect = str_replace('&', '&', $redirect);
}
return $redirect . ((strpos($redirect, '?') === false) ? '?' : '');
}

View File

@ -44,6 +44,11 @@ class phpbb_build_url_test extends phpbb_test_case
't',
'phpBB/index.php?',
),
array(
'viewtopic.php?t=5&f=4',
false,
'phpBB/viewtopic.php?t=5&f=4',
),
array(
'viewtopic.php?f=2&style=1&t=6',
'f',