From ea026e265059a04af5c1aec102e33ae910ce326d Mon Sep 17 00:00:00 2001 From: messju Date: Mon, 28 Jul 2003 20:36:55 +0000 Subject: [PATCH] quote smarty-header properly to prevent resource-names from escaping from the comment --- libs/Smarty_Compiler.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 1e51272c..e8f725df 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -357,7 +357,7 @@ class Smarty_Compiler extends Smarty { // put header at the top of the compiled template $template_header = "_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n"; - $template_header .= " compiled from ".$resource_name." */ ?>\n"; + $template_header .= " compiled from ".strtr(urlencode($resource_name), array('%2F'=>'/', '%3A'=>':'))." */ ?>\n"; /* Emit code to load needed plugins. */ $this->_plugins_code = '';