Safely pass object to client in Node.js/express via window.atob - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window atob

Description

Safely pass object to client in Node.js/express via window.atob

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){//w ww .  j ava  2  s  .c  om
var test2 = JSON.parse(window.atob(' your  value'));
    }

      </script> 
   </head> 
   <body> 
      <h1>XSS</h1>  
   </body>
</html>

Related Tutorials