man42.net
How to safely escape user data in a script tag - man42 blog
How to safely escape user data in a script tag'