【发布时间】:2016-05-18 13:16:54
【问题描述】:
我正在从 django 项目的数据库中加载文本以在模板中显示它。
在存储在数据库中的文本中,我添加了一些 HTML 标签,但浏览器似乎无法解释这些 html 标签。
这是我的模板:
<div>
<!-- body_text = "<strong>Hello</strong> word" -->
{{ entry.body_text }}
</div>
我得到了原始文本:<strong>Hello</strong> word 而不是
<strong>Hello</strong> word
我做错了什么?
【问题讨论】:
标签: javascript python html django