Commit e7cad93e authored by Keegi's avatar Keegi

Escape double quotes in commands

parent da5d5afe
...@@ -539,6 +539,7 @@ class pronsole(cmd.Cmd): ...@@ -539,6 +539,7 @@ class pronsole(cmd.Cmd):
if ls.startswith('!'): if ls.startswith('!'):
return ws + ls[1:] + "\n" # python mode return ws + ls[1:] + "\n" # python mode
else: else:
ls = ls.replace('"','\\"') # need to escape double quotes
ret = ws + 'self.parseusercmd("'+ls+'".format(*arg))\n' # parametric command mode ret = ws + 'self.parseusercmd("'+ls+'".format(*arg))\n' # parametric command mode
return ret + ws + 'self.onecmd("'+ls+'".format(*arg))\n' return ret + ws + 'self.onecmd("'+ls+'".format(*arg))\n'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment