Fix bug with js print() breaking on certain characters

The message text needs to be escaped before being evaluated.

If someone has a more complete list of characters to escape I can add those.