前端使用富文本编辑器 ckeditor 生成的代码存储在数据库中,当从后台取出要展示到前端时,需要加上 {% autoescape off %} {% endautoescape %} 才能正常显示{% autoescape off %}{{ html_content }}{% endautoescape %}或者只是当成一般文本显示