【发布时间】:2012-08-07 06:22:33
【问题描述】:
有什么方法可以像默认一样在 php smarty 中使用 strip_tags 来允许特定的 html 标签通过?
stip_tags($a.message,'<p><div>');
smarty 中的等价物是什么?
{$a.message|strip_tags}
【问题讨论】:
-
你可以使用 regex_replace 代替。见:smarty.net/docsv2/en/language.modifier.regex.replace.tpl