title: Safely pass object to client in Node.js/express
body: <p>A common question is how to pass an object from Node.js/Express.js to the browser.  It's possible to do that using JSON stringify, but if the object contains user-provided data, that can open the door to script-injection and possibly other attacks.  </p>
  
  <p>Is there a downside to the approach mentioned in this link using Base64?</p>
  
  <p><a href="https://stackoverflow.com/a/37920555/645715">https://stackoverflow.com/a/37920555/645715</a></p>
  
  <p>Related links:</p>
  
  <p><a href="https://stackoverflow.com/questions/11151632/passing-an-object-to-client-in-node-express-ejs/18106721#18106721">Passing an object to client in node/express + ejs?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/24196830/how-to-pass-a-javascript-object-that-contains-strings-with-quotes-from-node-js-t">How to pass a javascript object that contains strings with quotes from node.js to the browser?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/46714440/pass-a-nodejs-express-object-to-angularjs-1-6">Pass a NodeJS express object to AngularJS 1.6</a></p>
  
  <p><a href="https://stackoverflow.com/questions/11151632/passing-an-object-to-client-in-node-express-ejs/18106721#18106721">Passing an object to client in node/express + ejs?</a></p>