I would suggest escaping this string with htmlspecialchars. Translators can put ```'``` in message and then our js object would be broken.