I’m using this code {$entry.entry|strip_tags} to strip tags, however I would just like to strip <p> tags and not all HTML tags.
Can someone help?
Thank you
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.
If you want to strip ONLY
<p>tags, try a simple regular-expression replacement:This will replace
<p>,</p>and all<p many attributes>strings with an empty string.Let me know if it works. I tested the regular expression in PHP, not directly in Smarty.