如何逃离<&燃气轮机;在javascript模板中?
使用下划线模板时,我希望在锚点的href属性中插入一个值,如如何逃离<&燃气轮机;在javascript模板中?,javascript,html,templates,escaping,pug,Javascript,Html,Templates,Escaping,Pug,使用下划线模板时,我希望在锚点的href属性中插入一个值,如 a(href= "<%= id %>", class='products') //underscore template in jade a(href=”,class='products')//在jade中下划线模板 但问题是 <a href="<% id %>" class="products"> 那么,如何转义符号,并正确地插值呢?使用!=而不是=取消景观 就你而言:
a(href= "<%= id %>", class='products') //underscore template in jade
a(href=”,class='products')//在jade中下划线模板
但问题是
<a href="<% id %>" class="products">
那么,如何转义
a.products(href!="<%= id %>")
a.products(href!=“”)
你真的想这么做吗:a(href=”,class='products')@chenliang,你能提供更多细节吗?你想要的不是有效的HTML。这是同一个问题请查看@chenliang,不要发布同一个问题两次。这在这里是不能容忍的。再次发帖前请阅读常见问题:请删除您的一个问题。对不起,第一个问题只能回答一个问题,我真的需要解决这个问题