PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/code/web/private_php/ams/smarty/libs/plugins/variablefilter.htmlspecialchars.php

https://bitbucket.org/ryzom/ryzomcore
PHP | 19 lines | 5 code | 1 blank | 13 comment | 0 complexity | eaaa9a36bf26d609af23558cfb4928c0 MD5 | raw file
Possible License(s): Apache-2.0, AGPL-3.0, GPL-3.0, LGPL-2.1
  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. *
  13. * @return string filtered output
  14. */
  15. function smarty_variablefilter_htmlspecialchars($source)
  16. {
  17. return htmlspecialchars($source, ENT_QUOTES, Smarty::$_CHARSET);
  18. }