当前位置: 代码迷 >> PHP >> smarty里头的strip_tags有allow吗
  详细解决方案

smarty里头的strip_tags有allow吗

热度:108   发布时间:2016-04-29 00:44:38.0
smarty里面的strip_tags有allow吗?
strip_tags(string,allow)
strip_tags() 函数剥去 HTML、XML 以及 PHP 的标签。
allow规定允许的标签。这些标签不会被删除。这样的话我可以只保留<p>.

但是在smarty里面应该怎么写?
{$content|strip_tags:"<p>"}这样出不来啊。

------解决方案--------------------
建议你还是在php处理完了再传给smarty吧。