Ticket #1357: shell-noquote.patch
File shell-noquote.patch, 701 bytes (added by , 4 years ago) |
---|
-
xpra/scripts/server.py
137 137 138 138 139 139 def sh_quotemeta(s): 140 safe = ("abcdefghijklmnopqrstuvwxyz" 141 + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 142 + "0123456789" 143 + "/._:,-+") 144 quoted_chars = [] 145 for char in s: 146 if char not in safe: 147 quoted_chars.append("\\") 148 quoted_chars.append(char) 149 return "\"%s\"" % ("".join(quoted_chars),) 140 return "'" + s.replace("'", "'\\''") + "'" 150 141 151 142 def xpra_runner_shell_script(xpra_file, starting_dir, socket_dir): 152 143 script = []