summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-07-25 09:30:04 +0200
committerGitHub <noreply@github.com>2016-07-25 09:30:04 +0200
commit121aea89e2eb6a4d48de83d2618b263b5c87dd75 (patch)
treee09d2f5f407cd7dd835b76dd7957ba773d91d1b0 /tests
parenta270d6853aff2f8ea7ef2d5d78329dd458e5ad36 (diff)
parent5afba5a8c444d608712174665288aa10237e8b27 (diff)
Merge pull request #4725 from tianhe1986/develop_url_encode_case_insensitive
Fix remove_invisible_characters() for URL-encoded characters in upper case
Diffstat (limited to 'tests')
-rw-r--r--tests/codeigniter/core/Common_test.php12
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