fixed escaping of template-filenames in the generated code that loads

needed plugins
This commit is contained in:
messju
2004-12-17 08:30:56 +00:00
parent e17f1177e2
commit f44f5bddba
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@@ -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

View File

@@ -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),';
}
}