nanocoder icon indicating copy to clipboard operation
nanocoder copied to clipboard

[Bug] notifications.ts AppleScript escape missing newlines/Unicode

Open akramcodez opened this issue 3 months ago • 1 comments

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

  1. Trigger a desktop notification containing newlines (\n) in the message.
  2. 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

akramcodez avatar Sep 02 '26 06:09 akramcodez

hey @akramcodez! can i take this issue?

rishu685 avatar Sep 06 '26 16:09 rishu685