Tornado Documentation
http://www.v2ex.com/tornado/
Tornado on GitHub
https://github.com/facebook/tornado/
Tornado Gists
http://tornadogists.org/
kenneth
V2EX  ›  Tornado

如何关闭模板的自动转义?

  •  
  •   kenneth · Dec 25, 2012 · 4750 views
    This topic created in 4887 days ago, the information mentioned may be changed or developed.
    @Livid
    http://www.mvmap.com/t/1
    评论{{cmt.content}}
    有的链接希望不要自动转义。
    如何关闭呢?
    4 replies    1970-01-01 08:00:00 +08:00
    ipconfiger
        1
    ipconfiger  
       Dec 25, 2012
    {{cmt.content|safe}}
    kenneth
        2
    kenneth  
    OP
       Dec 25, 2012
    @ipconfiger 似乎不起作用啊,我前面还放了几个过滤器,比如nl2br。
    ccdjh
        3
    ccdjh  
       Dec 26, 2012
    你的意思是要 {% autoescape None %}这个么?
    1314258
        4
    1314258  
       Feb 10, 2013 via iPhone
    raw
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3608 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 10:38 · PVG 18:38 · LAX 03:38 · JFK 06:38
    ♥ Do have faith in what you're doing.