Open d4h0 opened 4 years ago
Damn that's a silly omission. Changing it is a breaking change though :(
Maybe a second method can be added, with a warning that it will be deprecated or removed after the next major release?
At least the current behavior of Tera::render_str
should be documented (does it escape, or not? I guess the default setting of the Tera instance will be used).
(This is offtopic, but it also would be useful if the docs would say if or if not the Tera::render_str
one-off template has access to all of the functionality that regular templates in the Tera instance have. Most likely they have, but this wasn't clear to me at a glance).
On the other hand, one-off templates don't have a file extension, so the default value can't even be used (if I understand everything correctly). Even more important to document the behavior of Tera::render_str
:)
Hi,
Tera::one_off has an 'autoescape' option (that makes it possible to define if HTML escaping is on or off). Tera::render_str – which seems to be the same method but for an existing Tera instance – is missing this option for some reason.