From: Claudio-Daniel Freire Date: Wed, 7 Sep 2011 18:27:38 +0000 (+0200) Subject: Escape quotes as well - it's not always OK to leave them unquoted X-Git-Tag: nepi-3.0.0~242 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c3cf1fb6775ef6bba65883206e292254f2a72286;p=nepi.git Escape quotes as well - it's not always OK to leave them unquoted --- diff --git a/src/nepi/util/server.py b/src/nepi/util/server.py index 7a71eef7..ffed2c7b 100644 --- a/src/nepi/util/server.py +++ b/src/nepi/util/server.py @@ -46,7 +46,7 @@ def shell_escape(s): else: # unsafe string - escape def escp(c): - if (32 <= ord(c) < 127 or c in ('\r','\n','\t')) and c not in ("'",): + if (32 <= ord(c) < 127 or c in ('\r','\n','\t')) and c not in ("'",'"'): return c else: return "'$'\\x%02x''" % (ord(c),)