Hi all,
I am using jinja2 to substitute simple text fields from a web form into
various YAML templates.
A simplified example template...
customer_order:
uuid: {{ order.id | e }}
customer_name: {{ order.customer.name | e }}
postal_code: {{ order.delivery_address.postal_code | e }}
As you can see, I have made a custom filter to replace the builtin "e". In
this case, the filter assumes a string as input and actually renders the
the output using json.dumps() (since a JSON one-liner is always valid YAML).
I can see that jinja2 is turning off the autoescape for me because my files
are named *.yaml instead of *.html. My question is:
*Is there a way to apply a custom autoescape filter instead of just turning
it off?*
Thanks for any pointers.
Regards,
James
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pocoo-libs.
For more options, visit https://groups.google.com/d/optout.