aboutsummaryrefslogtreecommitdiffhomepage
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/Utils.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/application/Utils.php b/application/Utils.php
index 91e28a68..3d819716 100644
--- a/application/Utils.php
+++ b/application/Utils.php
@@ -62,7 +62,11 @@ function endsWith($haystack, $needle, $case=true)
62} 62}
63 63
64/** 64/**
65 * htmlspecialchars wrapper 65 * Htmlspecialchars wrapper
66 *
67 * @param string $str the string to escape.
68 *
69 * @return string escaped.
66 */ 70 */
67function escape($str) 71function escape($str)
68{ 72{
@@ -70,6 +74,18 @@ function escape($str)
70} 74}
71 75
72/** 76/**
77 * Reverse the escape function.
78 *
79 * @param string $str the string to unescape.
80 *
81 * @return string unescaped string.
82 */
83function unescape($str)
84{
85 return htmlspecialchars_decode($str);
86}
87
88/**
73 * Link sanitization before templating 89 * Link sanitization before templating
74 */ 90 */
75function sanitizeLink(&$link) 91function sanitizeLink(&$link)