buttonsrtoys
buttonsrtoys

Reputation: 2771

How to format special characters inserted into a Jinja2 template?

I want to insert a bullet into an HTML file generated by a Jinja2 template. The Python code sends the string

'●' 

but when in the HTML code it's generated as

●

so the reader sees the code for the special character, no the special character itself?

Upvotes: 2

Views: 6429

Answers (1)

djc
djc

Reputation: 11711

I think you have to use the safe filter to prevent Jinja from auto-escaping.

Upvotes: 4

Related Questions