Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
InvisionHQ Posted July 31, 2017 Posted July 31, 2017 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)
newbie LAC Posted July 31, 2017 Posted July 31, 2017 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())"}
InvisionHQ Posted July 31, 2017 Author Posted July 31, 2017 I do it with: {{$plaincontent = strip_tags($content)}} ...I missed the " ; " at the end.... Thank anyway.
bfarber Posted July 31, 2017 Posted July 31, 2017 There is a striptags template tag you can use, although the way you are doing it works fine as well. {striptags="$content"}
Recommended Posts
Archived
This topic is now archived and is closed to further replies.