summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-01 14:14:34 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-01 14:14:34 +0100
commit7c4d10660a0a47446474bf97e3cb65f80693f1ee (patch)
tree9ba3d1c2f96d4bc23f128791e997c5da275b6942 /tests
parentce1b02a0fa8e07f769c41634e19c15482244e687 (diff)
Fix issue #1953 (form values being escaped twice)
Re-instaing an improved form_prep() function, reverting most of the changes from 74ffd17ab06327ca62ddfe28a186cae7ba6bd459.
Diffstat (limited to 'tests')
-rw-r--r--tests/codeigniter/helpers/form_helper_test.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/codeigniter/helpers/form_helper_test.php b/tests/codeigniter/helpers/form_helper_test.php
index 03278581d..89165271e 100644
--- a/tests/codeigniter/helpers/form_helper_test.php
+++ b/tests/codeigniter/helpers/form_helper_test.php
@@ -272,6 +272,21 @@ EOH;
$this->assertEquals($expected, form_close('</div></div>'));
}
+ // ------------------------------------------------------------------------
+
+ public function test_form_prep()
+ {
+ $this->assertEquals(
+ 'Here is a string containing &quot;quoted&quot; text.',
+ form_prep('Here is a string containing "quoted" text.')
+ );
+
+ $this->assertEquals(
+ 'Here is a string containing a &lt;tag&gt;.',
+ form_prep('Here is a string containing a <tag>.', TRUE)
+ );
+ }
+
}
/* End of file form_helper_test.php */ \ No newline at end of file