1👍
✅
OK, thanks to Bestasttung’s comment, I solved my problem with this:
{% autoescape off %}
<p>{% i18n 'Foobar' %}</p>
{% endautoescape %}
But that wasn’t very satisfying since I had multiple templates to update.
So, I simply changed my i18n
method from:
def i18n(context, key):
...
return s
to:
def i18n(context, key):
...
return mark_safe(s)
I hope that will help someone facing the same issue.
Source:stackexchange.com