From b06395edaf31767976e9010b3b4a63523196627d Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Thu, 15 Apr 2021 17:00:13 +0300 Subject: fix --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index 15cad1d..50fc468 100644 --- a/main.py +++ b/main.py @@ -101,10 +101,10 @@ def msg_shell(update: Update, context: CallbackContext) -> None: buf = '[stdout] ' + result.stdout.decode('utf-8') buf += '\n[stderr] ' + result.stderr.decode('utf-8') - reply(update, buf) + reply(update, escape(buf)) except Exception as e: logging.exception(str(e)) - reply(update, 'exception: ' + str(e)) + reply(update, 'exception: ' + escape(str(e))) def msg_spawn(update: Update, context: CallbackContext) -> None: @@ -113,7 +113,7 @@ def msg_spawn(update: Update, context: CallbackContext) -> None: os.spawnlp(os.P_NOWAIT, argv[0], *argv) except Exception as e: logging.exception(str(e)) - reply(update, 'exception: ' + str(e)) + reply(update, 'exception: ' + escape(str(e))) def msg_generation(update: Update, context: CallbackContext) -> None: -- cgit v1.2.3