nanocoder
nanocoder copied to clipboard
[Bug] notifications.ts AppleScript escape missing newlines/Unicode
Description
escapeAppleScript only escapes backslashes and double quotes. A newline or unescaped Unicode in the title/message terminates the string literal in display notification "..." with title "...", producing a syntax error and a broken notification.
Environment
- OS: macOS
- Node version: v22.20.0
- Nanocoder version: 1.30.0
- Provider: N/A
- Model: N/A
Steps to Reproduce
- Trigger a desktop notification containing newlines (
\n) in the message. - Check if the notification appears.
Expected Behavior
Notification appears correctly with newlines.
Actual Behavior
AppleScript syntax error occurs, and the event is silently dropped.
Additional Context
- [x] I have searched existing issues to ensure this is not a duplicate
- [x] I can reproduce this issue consistently
- [x] This issue occurs with the latest version of nanocoder
hey @akramcodez! can i take this issue?