From e7a2aa09df05547211776bf493adb6da476f3858 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 18 Mar 2014 18:44:53 +0200 Subject: xss_clean() improvement Fixes this: https://github.com/EllisLab/CodeIgniter/issues/2667#issuecomment-37819186 --- tests/codeigniter/core/Security_test.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/codeigniter/core/Security_test.php') diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index 433ad313f..14e042ee2 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -71,6 +71,12 @@ class Security_test extends CI_TestCase { $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $harmless_string); } + public function test_xss_clean_entity_double_encoded() + { + $input = 'Clickhere'; + $this->assertEquals('Clickhere', $this->security->xss_clean($input)); + } + // -------------------------------------------------------------------- public function test_xss_hash() -- cgit v1.2.3-24-g4f1b