home
·
contact
·
privacy
projects
/
plomrogue2-experiments
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add safeguards against illegal rows/cols values.
[plomrogue2-experiments]
/
new
/
plomrogue
/
misc.py
1
def quote(string):
2
"""Quote & escape string so client interprets it as single token."""
3
quoted = []
4
quoted += ['"']
5
for c in string:
6
if c in {'"', '\\'}:
7
quoted += ['\\']
8
quoted += [c]
9
quoted += ['"']
10
return ''.join(quoted)