From eecb18e702bc269bbf7fd5b4f8a9ec9e18557031 Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 20 Feb 2006 23:25:30 +0000 Subject: Code cleanup and added some documentation. --- framework/Web/THttpUtility.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'framework/Web/THttpUtility.php') diff --git a/framework/Web/THttpUtility.php b/framework/Web/THttpUtility.php index 34f1a8a4..398b3cf3 100644 --- a/framework/Web/THttpUtility.php +++ b/framework/Web/THttpUtility.php @@ -22,11 +22,23 @@ class THttpUtility { private static $_entityTable=null; + /** + * HTML-encodes a string. + * It is equivalent to {@link htmlspeicalchars} PHP function. + * @param string string to be encoded + * @return string encoded string + */ public static function htmlEncode($s) { return htmlspecialchars($s); } + /** + * HTML-decodes a string. + * It is the inverse of {@link htmlEncode}. + * @param string string to be decoded + * @return string decoded string + */ public static function htmlDecode($s) { if(!self::$_entityTable) -- cgit v1.2.3