summaryrefslogtreecommitdiff
path: root/framework/Web/THttpUtility.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/THttpUtility.php')
-rw-r--r--framework/Web/THttpUtility.php12
1 files changed, 12 insertions, 0 deletions
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)