Skip to content

Commit

Permalink
Merge pull request #33136 from kpodemski/smarty-deprecations
Browse files Browse the repository at this point in the history
Register commonly used deprecated modifiers to Smarty config
  • Loading branch information
Hlavtox committed Jul 19, 2023
2 parents f0a6b51 + bd74d2b commit 85f8802
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config/smarty.config.inc.php
Expand Up @@ -119,6 +119,18 @@ function smartyEscape($string, $esc_type = 'html', $char_set = null, $double_enc
smartyRegisterFunction($smarty, 'modifier', 'var_dump', 'var_dump');
smartyRegisterFunction($smarty, 'modifier', 'lcfirst', 'lcfirst');
smartyRegisterFunction($smarty, 'modifier', 'nl2br', 'nl2br');
smartyRegisterFunction($smarty, 'modifier', 'sizeof', 'sizeof');
smartyRegisterFunction($smarty, 'modifier', 'in_array', 'in_array');
smartyRegisterFunction($smarty, 'modifier', 'substr', 'substr');
smartyRegisterFunction($smarty, 'modifier', 'intval', 'intval');
smartyRegisterFunction($smarty, 'modifier', 'date', 'date');
smartyRegisterFunction($smarty, 'modifier', 'trim', 'trim');
smartyRegisterFunction($smarty, 'modifier', 'json_encode', 'json_encode');
smartyRegisterFunction($smarty, 'modifier', 'in_array', 'in_array');
smartyRegisterFunction($smarty, 'modifier', 'stripslashes', 'stripslashes');
smartyRegisterFunction($smarty, 'modifier', 'mt_rand', 'mt_rand');
smartyRegisterFunction($smarty, 'modifier', 'md5', 'md5');
smartyRegisterFunction($smarty, 'modifier', 'floatval', 'floatval');

function smarty_modifier_htmlentitiesUTF8($string)
{
Expand Down

0 comments on commit 85f8802

Please sign in to comment.