I have a special field in my form which allows users to add text with {{ special_str }}
which will be rendered by Jinja. However, I noticed that if the user uses {{
and }}
other than {{ special_str }}
this will cause rendering error for Jinja.
I am trying to replace all occurrence of {{
and }}
but not {{ special_str }}
.
How can I do this in Python?