mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-01 08:54:26 +02:00
Missed part of commit a3cbdc46
in the merge
This commit is contained in:
@@ -14,7 +14,7 @@ class StripTagsModifierCompiler extends Base {
|
|||||||
|
|
||||||
public function compile($params, \Smarty\Compiler\Template $compiler) {
|
public function compile($params, \Smarty\Compiler\Template $compiler) {
|
||||||
if (!isset($params[ 1 ]) || $params[ 1 ] === true || trim($params[ 1 ], '"') === 'true') {
|
if (!isset($params[ 1 ]) || $params[ 1 ] === true || trim($params[ 1 ], '"') === 'true') {
|
||||||
return "preg_replace('!<[^>]*?>!', ' ', {$params[0]} ?: '')";
|
return "preg_replace('!<[^>]*?>!', ' ', (string) {$params[0]})";
|
||||||
} else {
|
} else {
|
||||||
return 'strip_tags((string) ' . $params[ 0 ] . ')';
|
return 'strip_tags((string) ' . $params[ 0 ] . ')';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user