Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted July 31, 20177 yr I need to strips html tags from the $content in a plain text email template. I try to use strip_tags but I got a syntax error, unexpected '$return' (T_VARIABLE)
July 31, 20177 yr 28 minutes ago, InvisionHQ said: I try to use strip_tags but I got a How are you do it? I think something like {{strip_tags($content->content())}} Use {{$txt = strip_tags($content->content());}} {$txt} or {expression="strip_tags($content->content())"} or {expression="\IPS\Email::buildPlaintextBody($content->content())"}
July 31, 20177 yr Author I do it with: {{$plaincontent = strip_tags($content)}} ...I missed the " ; " at the end.... Thank anyway.
July 31, 20177 yr There is a striptags template tag you can use, although the way you are doing it works fine as well. {striptags="$content"}
Archived
This topic is now archived and is closed to further replies.