nodejs, jade escape markup

后端 未结 5 1218
隐瞒了意图╮
隐瞒了意图╮ 2020-12-30 08:35

I have an Express app using the default Jade view engine. When I try to render HTML as-is in a

 element, it gets rendered as actual DOM elements inst         


        
5条回答
  •  我在风中等你
    2020-12-30 09:17

    Jade uses the bang to force unescaped output. So you turn regular output to unescaped output with the following construct: !=
    If your content is inside an div tag you could do the following:

    div!= content
    

提交回复
热议问题