byrdr
byrdr

Reputation: 5487

ExpressJS preventing escaped apostrophes in interpolated variables

I am setting a variable to the current user being logged in but am receiving output back with escaped single quotation marks. Is there a way to prevent this escaping?

window.bootstrappedUserObject = <%= bootstrappedUser %>

Currently evaluates to

firstname: &#39;Rob&#39;,

Upvotes: 0

Views: 145

Answers (1)

mscdex
mscdex

Reputation: 106696

See the features list for ejs. By default you can use <%- bootstrappedUser %> for unescaped buffering.

Upvotes: 1

Related Questions