I used the strip_tags command in my News summary template to prevent my clients from mucking up the news feed. Can anybody tell me how to use strip_tags but allow links (or other tags)?
Thanks in advance!
[SOLVED] How to allow links with strip_tags smarty...?
[SOLVED] How to allow links with strip_tags smarty...?
Last edited by henchenm on Thu Oct 18, 2012 6:34 pm, edited 1 time in total.
Re: How to allow links with strip_tags smarty...?
try something like this:
{$entry->summary|replace:"<a":"(a"|replace:"</a>":"(/a)"|strip_tags|replace:"(a":"<a"|replace:"(/a)":"</a>"}
{$entry->summary|replace:"<a":"(a"|replace:"</a>":"(/a)"|strip_tags|replace:"(a":"<a"|replace:"(/a)":"</a>"}
Re: How to allow links with strip_tags smarty...?
That worked. Thanks!!!!!