In a twig file, I use {{file.html()|raw}} and I obtain something like <p alt="">mytext</p>.
Is it possible to obtain only the text mytext ?
Solved by Karmalakas View solution
Try striptags
TWIG
{{file.html()|raw|striptags}}
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 1 | 25 | 36 minutes ago | ||
| 3 | 480 | 1 month ago | ||
| 5 | 481 | 2 months ago | ||
| 1 | 460 | 2 months ago | ||
| 1 | 490 | 2 months ago |