【发布时间】:2017-09-11 14:53:23
【问题描述】:
我的 python 烧瓶应用程序中有一个变量,其中包含 html 数据
html_data='<p> this data to be displayed </p>'
我已经在render_template(temp.html,data=html_data) 中传递了这个变量。
我需要在我的 temp.html 中显示数据变量,作为 HTML 而不是字符串
我尝试过{{ data }},它将数据显示为字符串而不是 HTML。
output: <p> this data to be displayed</p>'
我希望以上数据显示为 HTML。
谢谢。
【问题讨论】: