diff --git a/NEWS b/NEWS index d09db65a..135ccea8 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - fix escaping in the generated code that calls smarty_core_load_plugins + (jes5199, messju) - fix invalid HTML issue with popup (Stefanos Harhalakis, Monte) - fixed {popup} to properly handle inarray and function parameters and added diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index b47bf542..b6aa6ea7 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -377,7 +377,7 @@ class Smarty_Compiler extends Smarty { $_plugins_params = "array('plugins' => array("; foreach ($this->_plugin_info as $plugin_type => $plugins) { foreach ($plugins as $plugin_name => $plugin_info) { - $_plugins_params .= "array('$plugin_type', '$plugin_name', '$plugin_info[0]', $plugin_info[1], "; + $_plugins_params .= "array('$plugin_type', '$plugin_name', '" . strtr($plugin_info[0], array("'" => "\\'", "\\" => "\\\\")) . "', $plugin_info[1], "; $_plugins_params .= $plugin_info[2] ? 'true),' : 'false),'; } }