Fieldtype

Archived
Forum
(read-only)

Expresso

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5

Back to this add-on's main page
View Other Add-ons From PutYourLightsOn

     

strip tags with single quotes not working

Support (Resolved)

shotgunflat
shotgunflat

I’m trying to pull an expresso field into OG and Twitter card description tags in the header.  I am doing this via a snippet, due to different channels having different content fields.  If I write

{field_name strip_tags="true"

it breaks my whole header, as the ” is read as a closing tag within the header.  When I turn it into a single quote:

{field_name strip_tags='true'

The output is blank.  Please note that the other OG and Twitter card tags are working properly, so it is specific to this field with expresso and the strip tags call.

PutYourLightsOn
# 1
Developer
PutYourLightsOn

This issue is more likely to do with the context in which your field appears (i.e., what other template code surrounds it? Is it wrapped inside other plugin or module tags? Etc.)

Expresso doesn’t parse your template, EE does, and this includes any parameters added to field tags. So for some reason EE is not identifying your parameter as a parameter and is likely outputting it as a string.

If you can paste more template context I could have a look. Usually in these cases I strip my templates down tot he bare minimum and work back up from there.