diff options
author | plegall <plg@piwigo.org> | 2015-12-30 16:21:32 +0100 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2015-12-30 16:21:32 +0100 |
commit | 3ec3cbe6cec5968d29cb11af139123191f4cb4ee (patch) | |
tree | 34aecd51071d63f8df1862a1a11898d8c43fe68a /include/smarty/libs/plugins/modifiercompiler.strip_tags.php | |
parent | 6ba0148e646b2a193dc4111bb0a443d8c193e646 (diff) | |
parent | 1681b02ee98c2deb740d394280a2a685170bc72e (diff) |
Merge branch 'bug/385-php7'
Diffstat (limited to 'include/smarty/libs/plugins/modifiercompiler.strip_tags.php')
-rw-r--r-- | include/smarty/libs/plugins/modifiercompiler.strip_tags.php | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/include/smarty/libs/plugins/modifiercompiler.strip_tags.php b/include/smarty/libs/plugins/modifiercompiler.strip_tags.php index 9ba71e3d9..da5d364cb 100644 --- a/include/smarty/libs/plugins/modifiercompiler.strip_tags.php +++ b/include/smarty/libs/plugins/modifiercompiler.strip_tags.php @@ -2,32 +2,28 @@ /** * Smarty plugin * - * @package Smarty + * @package Smarty * @subpackage PluginsModifierCompiler */ /** * Smarty strip_tags modifier plugin - * * Type: modifier<br> * Name: strip_tags<br> * Purpose: strip html tags from text * - * @link http://www.smarty.net/manual/en/language.modifier.strip.tags.php strip_tags (Smarty online manual) + * @link http://www.smarty.net/docs/en/language.modifier.strip.tags.tpl strip_tags (Smarty online manual) * @author Uwe Tews + * * @param array $params parameters + * * @return string with compiled code */ -function smarty_modifiercompiler_strip_tags($params, $compiler) +function smarty_modifiercompiler_strip_tags($params) { - if (!isset($params[1])) { - $params[1] = true; - } - if ($params[1] === true) { + if (!isset($params[1]) || $params[1] === true || trim($params[1], '"') == 'true') { return "preg_replace('!<[^>]*?>!', ' ', {$params[0]})"; } else { return 'strip_tags(' . $params[0] . ')'; } } - -?>
\ No newline at end of file |