(Bug 4928) ejs the translation string before putting it into JS

Makes sure that any quotes are escaped before they can cause trouble.