[SOLVED] How to allow links with strip_tags smarty...?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
henchenm
Forum Members
Forum Members
Posts: 40
Joined: Wed Jun 17, 2009 5:19 pm

[SOLVED] How to allow links with strip_tags smarty...?

Post by henchenm »

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!
Last edited by henchenm on Thu Oct 18, 2012 6:34 pm, edited 1 time in total.
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am
Location: Berlin

Re: How to allow links with strip_tags smarty...?

Post by nicmare »

try something like this:
{$entry->summary|replace:"<a":"(a"|replace:"</a>":"(/a)"|strip_tags|replace:"(a":"<a"|replace:"(/a)":"</a>"}
henchenm
Forum Members
Forum Members
Posts: 40
Joined: Wed Jun 17, 2009 5:19 pm

Re: How to allow links with strip_tags smarty...?

Post by henchenm »

That worked. Thanks!!!!!
Post Reply

Return to “Modules/Add-Ons”