mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-02 21:31:48 +01:00
Replace '*/' in user supplied input in C-style comments with '* /'.
This commit is contained in:
@@ -44,9 +44,12 @@ class Smarty_Internal_Runtime_CodeFrame
|
||||
$properties[ 'file_dependency' ] = $_template->cached->file_dependency;
|
||||
$properties[ 'cache_lifetime' ] = $_template->cache_lifetime;
|
||||
}
|
||||
$output = "<?php\n";
|
||||
$output .= "/* Smarty version {$properties[ 'version' ]}, created on " . date("Y-m-d H:i:s") .
|
||||
"\n from '" . str_replace('*/', '* /', $_template->source->filepath) . "' */\n\n";
|
||||
$output = sprintf(
|
||||
"<?php\n/* Smarty version %s, created on %s\n from '%s' */\n\n",
|
||||
$properties[ 'version' ],
|
||||
date("Y-m-d H:i:s"),
|
||||
str_replace('*/', '* /', $_template->source->filepath)
|
||||
);
|
||||
$output .= "/* @var Smarty_Internal_Template \$_smarty_tpl */\n";
|
||||
$dec = "\$_smarty_tpl->_decodeProperties(\$_smarty_tpl, " . var_export($properties, true) . ',' .
|
||||
($cache ? 'true' : 'false') . ')';
|
||||
|
||||
Reference in New Issue
Block a user