mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-28 02:41:37 +01:00
- implementation of a 'variable' filter as replacement for default modifier
- update of unregister_....filter methods
This commit is contained in:
21
libs/plugins/variablefilter.htmlspecialchars.php
Normal file
21
libs/plugins/variablefilter.htmlspecialchars.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user