mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-11-03 22:01:36 +01:00 
			
		
		
		
	Replace '*/' in user supplied input in C-style comments with '* /'.
This commit is contained in:
		@@ -134,7 +134,7 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
 | 
			
		||||
        if ($compiler->template->compiled->has_nocache_code) {
 | 
			
		||||
            $compiler->parent_compiler->tpl_function[ $_name ][ 'call_name_caching' ] = $_funcNameCaching;
 | 
			
		||||
            $output = "<?php\n";
 | 
			
		||||
            $output .= "/* {$_funcNameCaching} */\n";
 | 
			
		||||
            $output .= $compiler->cStyleComment(" {$_funcNameCaching} ") . "\n";
 | 
			
		||||
            $output .= "if (!function_exists('{$_funcNameCaching}')) {\n";
 | 
			
		||||
            $output .= "function {$_funcNameCaching} (Smarty_Internal_Template \$_smarty_tpl,\$params) {\n";
 | 
			
		||||
            $output .= "ob_start();\n";
 | 
			
		||||
@@ -159,7 +159,7 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
 | 
			
		||||
            $output .= "/*/%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/\";\n?>";
 | 
			
		||||
            $output .= "<?php echo str_replace('{$compiler->template->compiled->nocache_hash}', \$_smarty_tpl->compiled->nocache_hash, ob_get_clean());\n";
 | 
			
		||||
            $output .= "}\n}\n";
 | 
			
		||||
            $output .= "/*/ {$_funcName}_nocache */\n\n";
 | 
			
		||||
            $output .= $compiler->cStyleComment("/ {$_funcName}_nocache ") . "\n\n";
 | 
			
		||||
            $output .= "?>\n";
 | 
			
		||||
            $compiler->parser->current_buffer->append_subtree(
 | 
			
		||||
                $compiler->parser,
 | 
			
		||||
@@ -179,7 +179,7 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
 | 
			
		||||
        }
 | 
			
		||||
        $compiler->parent_compiler->tpl_function[ $_name ][ 'call_name' ] = $_funcName;
 | 
			
		||||
        $output = "<?php\n";
 | 
			
		||||
        $output .= "/* {$_funcName} */\n";
 | 
			
		||||
        $output .= $compiler->cStyleComment(" {$_funcName} ") . "\n";
 | 
			
		||||
        $output .= "if (!function_exists('{$_funcName}')) {\n";
 | 
			
		||||
        $output .= "function {$_funcName}(Smarty_Internal_Template \$_smarty_tpl,\$params) {\n";
 | 
			
		||||
        $output .= $_paramsCode;
 | 
			
		||||
@@ -196,7 +196,7 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
 | 
			
		||||
        );
 | 
			
		||||
        $compiler->parser->current_buffer->append_subtree($compiler->parser, $_functionCode);
 | 
			
		||||
        $output = "<?php\n}}\n";
 | 
			
		||||
        $output .= "/*/ {$_funcName} */\n\n";
 | 
			
		||||
        $output .= $compiler->cStyleComment("/ {$_funcName} ") . "\n\n";
 | 
			
		||||
        $output .= "?>\n";
 | 
			
		||||
        $compiler->parser->current_buffer->append_subtree(
 | 
			
		||||
            $compiler->parser,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user