X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=smarty%2FSmarty-2.6.10%2Flibs%2Fplugins%2Fmodifier.strip_tags.php;fp=smarty%2FSmarty-2.6.10%2Flibs%2Fplugins%2Fmodifier.strip_tags.php;h=45f1ec14d15c2da03905bb8811d3061166f79b0a;hb=b42b2bf946332ad8544d53f610be9cb05e80bf56;hp=0000000000000000000000000000000000000000;hpb=e586807dafc64c3fe152ab518599e6cf3f0f84e1;p=mirrors%2FKyberia-bloodline.git diff --git a/smarty/Smarty-2.6.10/libs/plugins/modifier.strip_tags.php b/smarty/Smarty-2.6.10/libs/plugins/modifier.strip_tags.php new file mode 100644 index 0000000..45f1ec1 --- /dev/null +++ b/smarty/Smarty-2.6.10/libs/plugins/modifier.strip_tags.php @@ -0,0 +1,31 @@ + + * Name: strip_tags
+ * Purpose: strip html tags from text + * @link http://smarty.php.net/manual/en/language.modifier.strip.tags.php + * strip_tags (Smarty online manual) + * @param string + * @param boolean + * @return string + */ +function smarty_modifier_strip_tags($string, $replace_with_space = true) +{ + if ($replace_with_space) + return preg_replace('!<[^>]*?>!', ' ', $string); + else + return strip_tags($string); +} + +/* vim: set expandtab: */ + +?>