【发布时间】:2015-07-18 09:12:15
【问题描述】:
我有一些 HTML 内容想要传递给模板进行渲染。但是,它会转义标签以使用 HTML 实体 (<),因此它们显示为代码而不是标记。如何渲染传递给模板的 html?
tags = """<p>some text here</p>"""
render_template ('index.html',tags=tags)
{{ tags }}
'< some text here >'
我想要一个带有文本的段落。
some text here
【问题讨论】: