modified notifier.js to handle utf-8 errors

using escape causes api to crash when sending utf-8 error messages.
changed to encodeURIComponent