Encrypt javascript code to prevent javascript injection in MongoDB?
<p>I'm going to store javascript code in the MongoDB (No-SQL) database.</p>

<p>But to prevent javascript injection I want to encrypt the javascript code which is in a string.</p>

<p>Is there a way to encrypt it and then decrypt it without having a defect javascript code?</p>
