比如原本我们的模板代码是这样的:
{{post.content}}
现在我们把它变成这样:
{% autoescape off %}
{{post.content}}
{% endautoescape %}
或者直接{{ post.content|safe }} 效果相同。
最后显示正常:
比如原本我们的模板代码是这样的:
{{post.content}}
现在我们把它变成这样:
{% autoescape off %}
{{post.content}}
{% endautoescape %}
或者直接{{ post.content|safe }} 效果相同。
最后显示正常: