Escape js with esc_js rather than json_encode for compatibility reasons

json_encode adds a backslash in one of the parameters where we don't want one.
Merge pull request #25 from borkweb/6072-escape-js-differently

Escape js with esc_js rather than json_encode for compatibility reasons