From 0146f2f35c0b2783ff7b789303d3cb001fd675d2 Mon Sep 17 00:00:00 2001 From: mMarinetti Date: Thu, 20 Oct 2011 15:10:39 +0000 Subject: [PATCH] // + BO : new modifier htmlentitiesUTF8 --- config/smartyadmin.config.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/smartyadmin.config.inc.php b/config/smartyadmin.config.inc.php index 485bed7d1..4ada80709 100644 --- a/config/smartyadmin.config.inc.php +++ b/config/smartyadmin.config.inc.php @@ -39,12 +39,14 @@ $smarty->compile_check = (Configuration::get('PS_SMARTY_FORCE_COMPILE') == _PS_S $smarty->debugging = false; $smarty->debugging_ctrl = 'URL'; // 'NONE' on production + if (Configuration::get('PS_HTML_THEME_COMPRESSION')) $smarty->registerFilter('output', 'smartyMinifyHTML'); if (Configuration::get('PS_JS_HTML_THEME_COMPRESSION')) $smarty->registerFilter('output', 'smartyPackJSinHTML'); smartyRegisterFunction($smarty, 'modifier', 'truncate', 'smarty_modifier_truncate'); +smartyRegisterFunction($smarty, 'modifier', 'htmlentitiesUTF8', 'smarty_modifier_htmlentitiesUTF8'); smartyRegisterFunction($smarty, 'modifier', 'secureReferrer', array('Tools', 'secureReferrer')); smartyRegisterFunction($smarty, 'function', 't', 'smartyTruncate'); // unused @@ -129,6 +131,10 @@ function smarty_modifier_truncate($string, $length = 80, $etc = '...', $break_wo return $string; } +function smarty_modifier_htmlentitiesUTF8($string) +{ + return Tools::htmlentitiesUTF8($string); +} function smartyMinifyHTML($tpl_output, &$smarty) { $tpl_output = Media::minifyHTML($tpl_output);