aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/sys/utils.php
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2021-01-01 20:12:21 +0100
committerLaria Carolin Chabowski <laria@laria.me>2021-01-01 20:12:25 +0100
commitc9a7d3efc61b585d6765bb8e247d6fa1ace9f4fd (patch)
treedb43bdc64131bccb68d3004f1eec11ec28d0d4e2 /ratatoeskr/sys/utils.php
parent3a415231d36a48c48f51e1161b11160654961f73 (diff)
downloadratatoeskr-cms-master.tar.gz
ratatoeskr-cms-master.tar.bz2
ratatoeskr-cms-master.zip
Add htmlesc againHEADmaster
Some plugins use that function :(.
Diffstat (limited to 'ratatoeskr/sys/utils.php')
-rw-r--r--ratatoeskr/sys/utils.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/ratatoeskr/sys/utils.php b/ratatoeskr/sys/utils.php
new file mode 100644
index 0000000..8301e9f
--- /dev/null
+++ b/ratatoeskr/sys/utils.php
@@ -0,0 +1,25 @@
+<?php
+/*
+ * File: ratatoeskr/sys/utils.php
+ *
+ * Various useful helper functions.
+ *
+ * License:
+ * This file is part of Ratatöskr.
+ * Ratatöskr is licensed unter the MIT / X11 License.
+ * See "ratatoeskr/licenses/ratatoeskr" for more information.
+ */
+
+use r7r\cms\sys\Esc;
+
+/**
+ * Escape HTML (shorter than htmlspecialchars)
+ *
+ * @param mixed $text Input text
+ * @return string HTML
+ * @deprecated Use {@see Esc::esc()} instead.
+ */
+function htmlesc($text): string
+{
+ return Esc::esc($text);
+}