PageRenderTime 35ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/www/smarty/plugins/variablefilter.htmlspecialchars.php

https://bitbucket.org/IlyaSkriblovsky/meebible
PHP | 21 lines | 6 code | 2 blank | 13 comment | 0 complexity | 06361b7471df67d9801ba2a4c1b2c61f MD5 | raw file
  1. <?php
  2. /**
  3. * Smarty plugin
  4. *
  5. * @package Smarty
  6. * @subpackage PluginsFilter
  7. */
  8. /**
  9. * Smarty htmlspecialchars variablefilter plugin
  10. *
  11. * @param string $source input string
  12. * @param Smarty_Internal_Template $smarty Smarty object
  13. * @return string filtered output
  14. */
  15. function smarty_variablefilter_htmlspecialchars($source, $smarty)
  16. {
  17. return htmlspecialchars($source, ENT_QUOTES, Smarty::$_CHARSET);
  18. }
  19. ?>