summaryrefslogtreecommitdiffstats
path: root/lib/template.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-10-28 13:27:13 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2012-10-28 13:28:22 +0100
commitbf3dac05d10ffb18854e73e823a83503099aa77d (patch)
treec920be70185371048ad3cc6981f16b2d18aa37f1 /lib/template.php
parentfe6b987b3d48a5fc9bab8f4bfdccb99e9605f07a (diff)
downloadnextcloud-server-bf3dac05d10ffb18854e73e823a83503099aa77d.tar.gz
nextcloud-server-bf3dac05d10ffb18854e73e823a83503099aa77d.zip
added functions for printing escaped and unescaped values
Diffstat (limited to 'lib/template.php')
-rw-r--r--lib/template.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/template.php b/lib/template.php
index 972d75807c7..1ad47cbe52c 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -22,6 +22,22 @@
*/
/**
+ * Prints an XSS escaped string
+ * @param string $string the string which will be escaped and printed
+ */
+function p($string){
+ print(OC_Util::sanitizeHTML($string));
+}
+
+/**
+ * Prints an unescaped string
+ * @param string $string the string which will be printed as it is
+ */
+function print_unescaped($string){
+ print($string);
+}
+
+/**
* @brief make OC_Helper::linkTo available as a simple function
* @param string $app app
* @param string $file file