Is there any way to use strip_tags in php smarty like in default , to allow specific html tags to pass?
stip_tags($a.message,'<p><div>');
what is the equivalent in smarty ?
{$a.message|strip_tags}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m using Smarty 2.6.26 and
strip_tagsworks with an argument specifying which tags to keep.Try this:
PHP:
In the template:
{$string|strip_tags:"<p><div>"}<p>and<div>will not be stripped.