aboutsummaryrefslogtreecommitdiffstats
path: root/smarty/plugins/variablefilter.htmlspecialchars.php
diff options
context:
space:
mode:
authorJesús Eduardo <heckyel@hyperbola.info>2017-12-25 16:58:41 -0500
committerJesús Eduardo <heckyel@hyperbola.info>2017-12-25 16:58:41 -0500
commit49d54c0c3199fb8e380ce68f8fb08a308ddf56a7 (patch)
tree87e9be319452d75241476853a3b240aabdcbd7e2 /smarty/plugins/variablefilter.htmlspecialchars.php
parent6a844225b3b63b89926e136cf65c140df01a4677 (diff)
downloadytlibre-49d54c0c3199fb8e380ce68f8fb08a308ddf56a7.tar.lz
ytlibre-49d54c0c3199fb8e380ce68f8fb08a308ddf56a7.tar.xz
ytlibre-49d54c0c3199fb8e380ce68f8fb08a308ddf56a7.zip
migración mayor a smarty PHP
Diffstat (limited to 'smarty/plugins/variablefilter.htmlspecialchars.php')
-rw-r--r--smarty/plugins/variablefilter.htmlspecialchars.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/smarty/plugins/variablefilter.htmlspecialchars.php b/smarty/plugins/variablefilter.htmlspecialchars.php
new file mode 100644
index 0000000..aecd1e7
--- /dev/null
+++ b/smarty/plugins/variablefilter.htmlspecialchars.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFilter
+ */
+
+/**
+ * Smarty htmlspecialchars variablefilter plugin
+ *
+ * @param string $source input string
+ *
+ * @return string filtered output
+ */
+function smarty_variablefilter_htmlspecialchars($source)
+{
+ return htmlspecialchars($source, ENT_QUOTES, Smarty::$_CHARSET);
+}