cvs: smarty / NEWS /libs Smarty_Compiler.class.php

"Messju Mohr" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmessju1103272257@cvsserver>
messju		Fri Dec 17 03:30:57 2004 EDT

  Modified files:              
    /smarty	NEWS 
    /smarty/libs	Smarty_Compiler.class.php 
  Log:
  fixed escaping of template-filenames in the generated code that loads
  needed plugins
  
  
  
http://cvs.php.net/diff.php/smarty/NEWS?r1=1.481&r2=1.482&ty=u
Index: smarty/NEWS
diff -u smarty/NEWS:1.481 smarty/NEWS:1.482
--- smarty/NEWS:1.481	Wed Dec 15 15:42:05 2004
+++ smarty/NEWS	Fri Dec 17 03:30:56 2004
@@ -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
http://cvs.php.net/diff.php/smarty/libs/Smarty_Compiler.class.php?r1=1.351&r2=1.352&ty=u
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.351 smarty/libs/Smarty_Compiler.class.php:1.352
--- smarty/libs/Smarty_Compiler.class.php:1.351	Mon Nov  8 03:26:16 2004
+++ smarty/libs/Smarty_Compiler.class.php	Fri Dec 17 03:30:56 2004
@@ -26,7 +26,7 @@
  * @package Smarty
  */
 
-/* $Id: Smarty_Compiler.class.php,v 1.351 2004/11/08 08:26:16 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.352 2004/12/17 08:30:56 messju Exp $ */
 
 /**
  * Template compiling class
@@ -377,7 +377,7 @@
             $_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),';
                 }
             }

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.