Fix issue #1953 (form values being escaped twice)

Re-instaing an improved form_prep() function, reverting most of the changes from 74ffd17ab06327ca62ddfe28a186cae7ba6bd459.
diff --git a/tests/codeigniter/helpers/form_helper_test.php b/tests/codeigniter/helpers/form_helper_test.php
index 0327858..8916527 100644
--- a/tests/codeigniter/helpers/form_helper_test.php
+++ b/tests/codeigniter/helpers/form_helper_test.php
@@ -272,6 +272,21 @@
 		$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