- bugfix modifier strip_tags:true was compiled into wrong code (Forum Topic 24287)

- bugfix /n after ?> in Smarty.class.php did start output buffering (Issue 138)
This commit is contained in:
Uwe.Tews@googlemail.com
2013-05-21 21:01:23 +00:00
parent 8e2d249233
commit 6b5b06564f
3 changed files with 8 additions and 8 deletions

View File

@@ -1,4 +1,8 @@
===== trunk ===== ===== trunk =====
21.05.2013
- bugfix modifier strip_tags:true was compiled into wrong code (Forum Topic 24287)
- bugfix /n after ?> in Smarty.class.php did start output buffering (Issue 138)
25.04.2013 25.04.2013
- bugfix escape and wordrap modifier could be compiled into wrong code when used in {nocache}{/nocache} - bugfix escape and wordrap modifier could be compiled into wrong code when used in {nocache}{/nocache}
section but caching is disabled (Forum Topic 24260) section but caching is disabled (Forum Topic 24260)
@@ -11,6 +15,7 @@
- bugfix nocache blocks could be lost when using CACHING_LIFETIME_SAVED (Issue #133) - bugfix nocache blocks could be lost when using CACHING_LIFETIME_SAVED (Issue #133)
- bugfix Compile ID gets nulled when compiling child blocks (Issue #134) - bugfix Compile ID gets nulled when compiling child blocks (Issue #134)
24.01.2013 24.01.2013
- bugfix wrong tag type in smarty_internal_templatecompilerbase.php could cause wrong plugin search order (Forum Topic 24028) - bugfix wrong tag type in smarty_internal_templatecompilerbase.php could cause wrong plugin search order (Forum Topic 24028)

View File

@@ -1525,4 +1525,4 @@ function smartyAutoload($class)
} }
} }
?> ?>

View File

@@ -20,14 +20,9 @@
*/ */
function smarty_modifiercompiler_strip_tags($params, $compiler) function smarty_modifiercompiler_strip_tags($params, $compiler)
{ {
if (!isset($params[1])) { if (!isset($params[1]) || $params[1] === true || trim($params[1],'"') == 'true') {
$params[1] = true; return "preg_replace('!<[^>]*?>!', ' ', {$params[0]})";
}
if ($params[1] === true) {
return "preg_replace('!<[^>]*?>!', ' ', {$params[0]})";
} else { } else {
return 'strip_tags(' . $params[0] . ')'; return 'strip_tags(' . $params[0] . ')';
} }
} }
?>