Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

title and message not escaped when using AppleScript on macOS #37

Closed
ghost opened this issue Apr 29, 2020 · 1 comment
Closed

title and message not escaped when using AppleScript on macOS #37

ghost opened this issue Apr 29, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 29, 2020

func Notify(title, message, appIcon string) error {
...
	cmd := exec.Command(osa, "-e", `display notification "`+message+`" with title "`+title+`"`)
func Alert(title, message, appIcon string) error {
...
	cmd := exec.Command(osa, "-e", `tell application "System Events" to display notification "`+message+`" with title "`+title+`" sound name "default"`)

the code calls the binary osascript, but it fails if title or message contains a double quotation mark

@Endermanbugzjfc
Copy link

Agree.

gen2brain added a commit that referenced this issue May 18, 2022
fix quoting in macOS notify. fixes #37
@Endermanbugzjfc
Copy link

Finally.

@nervo
Copy link
Contributor

nervo commented Jun 6, 2022

Hm, sorry, but as far as i can see, notify is fixed by d7852ed, but not alert :) Am i wrong ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants