diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/notifier.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ui/notifier.c b/src/ui/notifier.c index 693817d6..e8bc61e3 100644 --- a/src/ui/notifier.c +++ b/src/ui/notifier.c @@ -243,10 +243,9 @@ _notify(const char * const message, int timeout, Shell_NotifyIcon(NIM_MODIFY, &nid); #endif #ifdef HAVE_OSXNOTIFY - GString *notify_command = g_string_new("terminal-notifier -title \"Profanity\" -message \""); + GString *notify_command = g_string_new("terminal-notifier -title \"Profanity\" -message '"); - char *escaped_double = str_replace(message, "\"", "\\\""); - char *escaped_single = str_replace(escaped_double, "`", "\\`"); + char *escaped_single = str_replace(message, "'", "'\\''"); if (escaped_single[0] == '<') { g_string_append(notify_command, "\\<"); @@ -264,8 +263,7 @@ _notify(const char * const message, int timeout, g_string_append(notify_command, escaped_single); } - g_string_append(notify_command, "\""); - free(escaped_double); + g_string_append(notify_command, "'"); free(escaped_single); char *term_name = getenv("TERM_PROGRAM"); @@ -288,4 +286,4 @@ _notify(const char * const message, int timeout, g_string_free(notify_command, TRUE); #endif -} \ No newline at end of file +} |