- Issue created by @freelylw
- 🇮🇳India hitvikav_
When using "Use aggregation: Yes" in Views, fields like Body output the raw stored value, so any HTML is shown as escaped entities (e.g., `<p>`). This happens because Views disables field formatters and text processing in aggregation mode.
Quick fix: Use "Rewrite results" and apply the `|striptags` or `|raw` Twig filter based on your needs:
* `{{ body|striptags }}` → for clean plain text
* `{{ body|raw }}` → to render HTML (only if content is trusted)
* Override the twig file - 🇬🇧United Kingdom freelylw
Thanks, its showing the text "<p>" at the front of the every body text when I apply "{{ body|striptags }}" into the "Override the output of this field with custom text" please advise what do to to fix this ? Thank you
- 🇮🇳India Ishani Patel
Hello @freelylw,
You can try with this {{ body.value|striptags }}
Because body.value gets the raw text content of the field. body alone might give you a rendered version with tags or wrappers still attached.Thank you!
- 🇮🇳India hitvikav_
Hi @freelylw,
If {{ body|striptags }} is not working you can try {{ body__value|raw }} it worked for me
@ishani patel {{ body.value|striptags }} didn't worked for me i guess we need to use the option present in rewrite result fields for raw value