aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functions
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-11-07 11:10:03 +0100
committerTristan Darricau <github@nicofuma.fr>2014-11-07 11:10:03 +0100
commita1b58d05d158ff7afd789c1b27821e17198f8d58 (patch)
tree41c5955e720b462173e78fed5c18c18057e0b62b /tests/functions
parent0e772afb9db640e54e84cfccaddcf74f3edbb3fb (diff)
parentf432193e0789f0182741d1b4a38a8c4cd86dfba4 (diff)
downloadforums-a1b58d05d158ff7afd789c1b27821e17198f8d58.tar
forums-a1b58d05d158ff7afd789c1b27821e17198f8d58.tar.gz
forums-a1b58d05d158ff7afd789c1b27821e17198f8d58.tar.bz2
forums-a1b58d05d158ff7afd789c1b27821e17198f8d58.tar.xz
forums-a1b58d05d158ff7afd789c1b27821e17198f8d58.zip
Merge pull request #3107 from marc1706/ticket/13280
[ticket/13280] Properly format the current page and add sanitizer to tests * marc1706/ticket/13280: [ticket/13280] Remove unneeded str_replace in build_url() [ticket/13280] Only run sanitizer for server superglobal and modify tests [ticket/13280] Seperate server sanitizer call and add comment [ticket/13280] Add additional sanitizer for ampersands in server superglobal [ticket/13280] Correctly format user page for build_url() [ticket/13280] Properly format the current page and add sanitizer to tests
Diffstat (limited to 'tests/functions')
-rw-r--r--tests/functions/build_url_test.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/functions/build_url_test.php b/tests/functions/build_url_test.php
index 06415a424e..5cfd1300de 100644
--- a/tests/functions/build_url_test.php
+++ b/tests/functions/build_url_test.php
@@ -69,6 +69,11 @@ class phpbb_build_url_test extends phpbb_test_case
array('f', 'style', 't'),
'http://test.phpbb.com/viewtopic.php?',
),
+ array(
+ 'posting.php?f=2&mode=delete&p=20%22%3Cscript%3Ealert%281%29%3B%3C%2Fscript%3E',
+ false,
+ 'phpBB/posting.php?f=2&amp;mode=delete&amp;p=20%22%3Cscript%3Ealert%281%29%3B%3C%2Fscript%3E',
+ )
);
}
@@ -80,6 +85,7 @@ class phpbb_build_url_test extends phpbb_test_case
global $user, $phpbb_root_path;
$user->page['page'] = $page;
+
$output = build_url($strip_vars);
$this->assertEquals($expected, $output);