- bugfix a newline was eaten when a <?xml ... ?> was passed by a Smarty variable and caching was enabled (forum topic 24482)

This commit is contained in:
Uwe.Tews@googlemail.com
2013-08-10 09:55:27 +00:00
parent 6d88d33c5b
commit 35d2e254bb
2 changed files with 823 additions and 820 deletions

View File

@@ -1,4 +1,7 @@
===== trunk =====
10.08.2013
- bugfix a newline was eaten when a <?xml ... ?> was passed by a Smarty variable and caching was enabled (forum topic 24482)
29.07.2013
- bugfix headers already send warning thrown when using 'SMARTY_DEBUG=on' from URL (Issue 148)

View File

@@ -235,7 +235,7 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
// loop over items, stitch back together
foreach ($cache_split as $curr_idx => $curr_split) {
// escape PHP tags in template content
$output .= preg_replace('/(<%|%>|<\?php|<\?|\?>)/', '<?php echo \'$1\'; ?>', $curr_split);
$output .= preg_replace('/(<%|%>|<\?php|<\?|\?>)/', "<?php echo '\$1'; ?>\n", $curr_split);
if (isset($cache_parts[0][$curr_idx])) {
$_template->properties['has_nocache_code'] = true;
// remove nocache tags from cache output