diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2021-04-15 17:00:13 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2021-04-15 17:00:13 +0300 |
commit | b06395edaf31767976e9010b3b4a63523196627d (patch) | |
tree | c9188dc11b065e423e4bc817ac8ea31304e8b572 | |
parent | 3a54981b4d40d96fc770839dee7aae6fcc921e19 (diff) |
fix
-rw-r--r-- | main.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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: |