How to make Jade stop HTML encoding element attributes, and produce a literal string value?

前端 未结 4 1767
太阳男子
太阳男子 2020-12-14 00:11

UPDATE Jade v0.24.0 fixes this with a != syntax for attributes. option(value!=\'<%= id %>\')


I\'m trying to bu

4条回答
  •  独厮守ぢ
    2020-12-14 00:24

    This feature has been added to Jade. You simply use the != operator if you want to unescape attribute values:

    script#my-template(type='text/template')
      a(href!='<%= url =>') Clicky clicky...
    

提交回复
热议问题