From 9765bc52638b1e9fe03d3f318eba9d102d8180b0 Mon Sep 17 00:00:00 2001 From: Paul Nameless Date: Sat, 24 Apr 2021 19:01:59 +0300 Subject: [PATCH] Fix escape --- tg/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tg/utils.py b/tg/utils.py index 57ce1de..54c6d19 100644 --- a/tg/utils.py +++ b/tg/utils.py @@ -181,8 +181,8 @@ def notify( notify_cmd = cmd.format( icon_path=shlex.quote(config.ICON_PATH), title=shlex.quote(title), - subtitle=shlex.quote(shlex.escape(subtitle)), - msg=shlex.quote(shlex.escape(msg)), + subtitle=shlex.quote(subtitle.replace("'", "'\\''") + "'"), + msg=shlex.quote(msg.replace("'", "'\\''") + "'"), ) subprocess.Popen(notify_cmd, shell=True)