Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/isida/vi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiSabler <dissy@ya.ru>2017-02-24 15:53:27 +0300
committerdiSabler <dissy@ya.ru>2017-02-24 15:53:27 +0300
commit4da72e91e519711b2f02638e8769ebe0b74a029b (patch)
treef0df08d4b94057bfa6c3cd16d56f33ce8673d6fb
parentd7a5837cbdbddab34f3b6cdbface273234771bc9 (diff)
fix: escape html in shell commands
-rw-r--r--kernel.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel.py b/kernel.py
index 80eb07d..493ed46 100644
--- a/kernel.py
+++ b/kernel.py
@@ -650,7 +650,7 @@ def shell_execute(cmd):
error_answ = os.system('%s > %s 2>&1' % (cmd.encode('utf-8'),tmp_file))
if not error_answ:
try:
- body = readfile(tmp_file)
+ body = html_escape_soft(readfile(tmp_file))
except:
body = '⚠️ Command execution error.'
if len(body):
@@ -661,7 +661,7 @@ def shell_execute(cmd):
else:
result = '⚠️ Command execution error.'
try:
- result += '\n' + readfile(tmp_file)
+ result += '\n' + html_escape_soft(readfile(tmp_file))
except:
pass
except Exception, MSG: