Django后台引入kindeditor富文本编辑器,在输入文章后,前台页面展示出来的是html代码,如图所示,原因是输入的内容被Django引擎自动转义了,解决办法:
{{ post.content | safe }}

或者
{% autoescape on %}
{{ post.content }}
{% endautoescape %} ​​​​
Django后台引入kindeditor富文本编辑器,在输入文章后,前台页面展示出来的是html代码

相关文章:

  • 2021-10-26
  • 2021-06-01
  • 2021-06-20
  • 2021-12-12
  • 2021-07-31
  • 2021-12-21
  • 2021-06-15
  • 2021-10-09
猜你喜欢
  • 2021-09-22
  • 2021-04-22
  • 2021-06-02
  • 2021-08-17
  • 2021-06-22
  • 2021-08-15
相关资源
相似解决方案