node-notifier
node-notifier copied to clipboard
Node-notifier doesn't escape parameters passed to notify-send command, resulting in error
For this alert:
{id":17,"date":"2020-03-20T13:01:00.325Z","title":"just dash as first character","body":"-\n\nmore text"}"
We are getting this error:
Error: Command failed: notify-send "just dash as first character" "-\n\nmore text" --icon "/tmp/.mount_Joplinu3xj3u/resources/build/icons/512x512.png" Unknown option -\n\nmore text
So it seems node-notified is not escaping the parameters passed to the notify-send command. I guess just wrapping in single quotes (instead of double) would work?
Or if not, the first dashes could probably be trimmed, which would be better than throwing an error.