how do I include quoted HTML in a Tornado Template?

后端 未结 1 367
被撕碎了的回忆
被撕碎了的回忆 2020-12-15 20:37

I\'m using Tornado Templates and one of my fields is a string that has HTML tags quoted in it, e.g.

Solar power

When I render it into the temp

相关标签:
1条回答
  • 2020-12-15 21:29

    {% raw foo %}, in Tornado 2.0+.

    If you do that with a lot of expressions in a template, you can add the {% autoescape None %} directive to the beginning of the template, after which {{ foo }} will not be escaped.

    0 讨论(0)
提交回复
热议问题