diff options
author | Marc Alexander <admin@m-a-styles.de> | 2014-11-03 16:24:09 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2014-11-03 16:24:09 +0100 |
commit | 6fd092b5df6f96530fec8ba1aec426b6d59b822b (patch) | |
tree | 750f1cafd8ace45c64256dba76a8511addca49e2 /tests | |
parent | 6cc7da0c9c0fc8515aad780fba5de5b3860e5d56 (diff) | |
download | forums-6fd092b5df6f96530fec8ba1aec426b6d59b822b.tar forums-6fd092b5df6f96530fec8ba1aec426b6d59b822b.tar.gz forums-6fd092b5df6f96530fec8ba1aec426b6d59b822b.tar.bz2 forums-6fd092b5df6f96530fec8ba1aec426b6d59b822b.tar.xz forums-6fd092b5df6f96530fec8ba1aec426b6d59b822b.zip |
[ticket/13280] Correctly format user page for build_url()
PHPBB3-13280
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functions/build_url_test.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/functions/build_url_test.php b/tests/functions/build_url_test.php index 06415a424e..df178f277e 100644 --- a/tests/functions/build_url_test.php +++ b/tests/functions/build_url_test.php @@ -79,9 +79,16 @@ class phpbb_build_url_test extends phpbb_test_case { global $user, $phpbb_root_path; - $user->page['page'] = $page; + $user->page['page'] = str_replace('%2F', '/', urlencode($this->sanitizer($page))); $output = build_url($strip_vars); $this->assertEquals($expected, $output); } + + protected function sanitizer($value) + { + $type_cast_helper = new \phpbb\request\type_cast_helper(); + $type_cast_helper->set_var($value, $value, gettype($value), true); + return $value; + } } |