I would like to include a link in the text of a connect-flash message:
JS
req.flash("registerMessage", "Sorry, the User ID you chose is already in use. Please choose another. If you have already registered and need assistance logging in, <a href=\"http://www.example.com/support/\">contact support</a>");
EJS
<% if (message.length > 0) { %>
<div class="alert alert-danger"><%= message %></div>
<% } %>
Result
<div class="alert alert-danger">Sorry, the User ID you chose is already in use. Please choose another. If you have already registered and need assistance logging in, <a href="http://www.example.com/support/">contact support</a>.</div>
Is there a way to prevent flash from escaping the HTML characters so I can display links in my messages?
You can use :
<%- message %>
to output unescaped HTML