EJS: <%= versus <%-

后端 未结 4 948
死守一世寂寞
死守一世寂寞 2020-12-15 07:26

I\'m using EJS with a Node.js web server I\'m building. I see many EJS examples that sometimes use <%= when outputting HTML or strings, while other examples

4条回答
  •  一生所求
    2020-12-15 07:49

    The version of EJS you're likely using in Node is not the same as the version you see on Google code; in the Node version, <%= escapes the HTML going into the buffer, while <%- does not. source

提交回复
热议问题