mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
quote smarty-header properly to prevent resource-names from escaping from the comment
This commit is contained in:
@@ -357,7 +357,7 @@ class Smarty_Compiler extends Smarty {
|
||||
|
||||
// put header at the top of the compiled template
|
||||
$template_header = "<?php /* Smarty version ".$this->_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 = '';
|
||||
|
Reference in New Issue
Block a user