Initial repo created
[timetracker.git] / WEB-INF / lib / smarty / plugins / variablefilter.htmlspecialchars.php
diff --git a/WEB-INF/lib/smarty/plugins/variablefilter.htmlspecialchars.php b/WEB-INF/lib/smarty/plugins/variablefilter.htmlspecialchars.php
new file mode 100644 (file)
index 0000000..4d3550c
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Smarty plugin
+ * 
+ * @package Smarty
+ * @subpackage PluginsFilter
+ */
+
+/**
+ * Smarty htmlspecialchars variablefilter plugin
+ * 
+ * @param string $source input string
+ * @param object $ &$smarty Smarty object
+ * @return string filtered output
+ */
+
+function smarty_variablefilter_htmlspecialchars($source, $smarty)
+{
+    return htmlspecialchars($source, ENT_QUOTES);
+} 
+
+?>
\ No newline at end of file