Timber Best Practices: escaping
-
Hi,
1) Timber saved me! (I started a project in another CMS with Twig and had to switch it over to WP. No prob!)
2) I’m relatively new to the nuances of WP, ACF, Twig, and Timber. I’m trying to figure out what exactly I need to escape in my Twig templates. In all the Timber docs and examples on the web, I don’t find a single output variable escaped. Is that right?
If I get
{{ post.content }}
, that’s been run through WP functions, so it’s fine, right?
But, if I get<img ... alt="{{ image.alt }}">
, that can have quotes, so|e('html_attr')
?
ACF WYSIWYG fields are doomed anyway, but ACF URL fields, plain text fields, and so forth? What’s the recommended approach?Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Timber Best Practices: escaping’ is closed to new replies.