PageRenderTime 45ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/libs/smarty/plugins/variablefilter.htmlspecialchars.php

https://bitbucket.org/jgivoni/vessel-3.0
PHP | 22 lines | 6 code | 3 blank | 13 comment | 0 complexity | 41de646253dc1c98805575bb386a8d2a MD5 | raw file
Possible License(s): GPL-2.0
  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 object $ &$smarty Smarty object
  13. * @return string filtered output
  14. */
  15. function smarty_variablefilter_htmlspecialchars($source, $smarty)
  16. {
  17. return htmlspecialchars($source, ENT_QUOTES);
  18. }
  19. ?>