Escape the javascript snippets