django - Which of autoescape tag and safe filter is better to use? -
i looking way unescape html in variables written in django template , found answer here. so, there 2 ways of doing it:
set
autoescapeoff:{% autoescape off %}{{ myhtmlstring }}{% endautoescape %}using
safefilter:{{ myhtmlstring | safe }}
my question 1 more adequate use (and in context). feeling safe filter django specific, on contrary autoescape seems used in jinja2. but, own way of thinking ?
Comments
Post a Comment