aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/sys/utils.php
diff options
context:
space:
mode:
Diffstat (limited to 'ratatoeskr/sys/utils.php')
-rw-r--r--ratatoeskr/sys/utils.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/ratatoeskr/sys/utils.php b/ratatoeskr/sys/utils.php
index a285bcd..8a848eb 100644
--- a/ratatoeskr/sys/utils.php
+++ b/ratatoeskr/sys/utils.php
@@ -22,6 +22,9 @@
*
* An array with $val $n-times repeated.
*/
+
+use r7r\cms\sys\Esc;
+
function array_repeat($val, $n)
{
$rv = [];
@@ -40,19 +43,16 @@ function intcmp($a, $b)
return ($a == $b) ? 0 : (($a < $b) ? -1 : 1);
}
-/*
- * Function: htmlesc
+/**
* Escape HTML (shorter than htmlspecialchars)
*
- * Parameters:
- * $text - Input text.
- *
- * Returns:
- * HTML
+ * @param mixed $text Input text
+ * @return string HTML
+ * @deprecated Use {@see Esc::esc()} instead.
*/
-function htmlesc($text)
+function htmlesc($text): string
{
- return htmlspecialchars($text, ENT_QUOTES, "UTF-8");
+ return Esc::esc($text);
}
/*