diff options
author | tianhe1986 <w1s2j3229@163.com> | 2016-07-22 19:02:01 +0200 |
---|---|---|
committer | tianhe1986 <w1s2j3229@163.com> | 2016-07-22 19:02:01 +0200 |
commit | 5afba5a8c444d608712174665288aa10237e8b27 (patch) | |
tree | 331aff3747dede23ce8a2a1a30703b71565abb65 /tests/codeigniter | |
parent | f461143b3336b78263ce473e283d0c67d9f7c111 (diff) |
Replace url_encoded invisible characters case-insensitively.
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
Diffstat (limited to 'tests/codeigniter')
-rw-r--r-- | tests/codeigniter/core/Common_test.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/codeigniter/core/Common_test.php b/tests/codeigniter/core/Common_test.php index 81a185eaf..ca19e5de0 100644 --- a/tests/codeigniter/core/Common_test.php +++ b/tests/codeigniter/core/Common_test.php @@ -54,4 +54,16 @@ class Common_test extends CI_TestCase { ); } + // ------------------------------------------------------------------------ + + public function test_remove_invisible_characters() + { + $raw_string = 'Here is a string containing invisible'.chr(0x08).' text %0e.'; + $removed_string = 'Here is a string containing invisible text %0e.'; + $this->assertEquals($removed_string, remove_invisible_characters($raw_string, FALSE)); + + $raw_string = 'Here is a string %0econtaining url_encoded invisible%1F text.'; + $removed_string = 'Here is a string containing url_encoded invisible text.'; + $this->assertEquals($removed_string, remove_invisible_characters($raw_string)); + } }
\ No newline at end of file |