Let's escape strings for javascript

Fix #1048