notify-send backend fails when user string starts with "-"
Related discussion: https://github.com/laurent22/joplin/issues/6029
Node-Notifier creates notify-send commands with the logical syntax of
notify-send $PARAMS $INPUT
In the event the string for the title/body in $INPUT begins with -, notify-send aborts the command because it interprets the string as a parameter it can't recognise. The fix for this is to create a clear separation between parameters and input, by appending -- between the two, so that parameter handling is disabled on the raw input.
notify-send $PARAMS -- $INPUT
As a concrete example from the linked issue:
notify-send --icon "/snap/joplin-desktop/23/opt/joplin-desktop/resources/build/icons/512x512.png" --expire-time "10000" "To do" "- [ ] plans for today"
fails, whereas
notify-send --icon "/snap/joplin-desktop/23/opt/joplin-desktop/resources/build/icons/512x512.png" --expire-time "10000" -- "To do" "- [ ] plans for today"
works just fine. It'd be ideal if notify-send would include this by default to prevent this from occuring.
Thanks in advance for any assistance you can offer :)