mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
back out changes to strip_tags
This commit is contained in:
@@ -8,12 +8,12 @@
|
|||||||
* Purpose: strip html tags from text
|
* Purpose: strip html tags from text
|
||||||
* -------------------------------------------------------------
|
* -------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_strip_tags($string, $replace_with_space = true, $allowed = "<i><b><br>")
|
function smarty_modifier_strip_tags($string, $replace_with_space = true)
|
||||||
{
|
{
|
||||||
if ($replace_with_space)
|
if ($replace_with_space)
|
||||||
return preg_replace('!<[^>]*?>!', ' ', $string);
|
return preg_replace('!<[^>]*?>!', ' ', $string);
|
||||||
else
|
else
|
||||||
return strip_tags($string, $allowed);
|
return strip_tags($string);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim: set expandtab: */
|
/* vim: set expandtab: */
|
||||||
|
@@ -8,12 +8,12 @@
|
|||||||
* Purpose: strip html tags from text
|
* Purpose: strip html tags from text
|
||||||
* -------------------------------------------------------------
|
* -------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
function smarty_modifier_strip_tags($string, $replace_with_space = true, $allowed = "<i><b><br>")
|
function smarty_modifier_strip_tags($string, $replace_with_space = true)
|
||||||
{
|
{
|
||||||
if ($replace_with_space)
|
if ($replace_with_space)
|
||||||
return preg_replace('!<[^>]*?>!', ' ', $string);
|
return preg_replace('!<[^>]*?>!', ' ', $string);
|
||||||
else
|
else
|
||||||
return strip_tags($string, $allowed);
|
return strip_tags($string);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim: set expandtab: */
|
/* vim: set expandtab: */
|
||||||
|
Reference in New Issue
Block a user