To avoid cross-site scripting (XSS) attacks, EJS escapes any JavaScript code included within the ______ tags by default.

  • <%= %>
  • {{ }}
  • {% %}
  • ()()
In EJS, to avoid XSS attacks, JavaScript code is escaped by default when placed within <%= %> tags. This means that any code within these tags will be treated as plain text and not executed. The other options are not used for escaping JavaScript code in EJS.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *